#endif // DEBUG
}
-void ControlServer::real_run(void) {
+void ControlServer::real_run(void) throw() {
#ifdef DEBUG
cerr << __FILE__ << "(" << __LINE__ << ")"
<< ": real_run()" << endl;
#endif // DEBUG
//char buf[BUFSIZ];
- while (!stop) {
+ while (!stop()) {
Command command;
try {
//Glib::Mutex::Lock lock(socket_mutex);
socket >> command;
} catch (const ios::failure& e) {
// TODO poner buenos codigos de error.
- error(1000000, "Se desconectó.");
+ signal_error().emit(1000000, "Se desconectó.");
return;
} catch (const sockerr& e) {
- error(e.serrno(), e.errstr());
+ signal_error().emit(e.serrno(), e.errstr());
return;
// Si se cerró el socket.
//} catch (const ios::failure& e) {
}
}
-void ControlServer::send(const HTTPResponse& response) {
+void ControlServer::send(const Response& response) {
//Glib::Mutex::Lock lock(socket_mutex);
socket << response << flush;
#ifdef DEBUG