]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/src/connection.cpp
Capturo las seniales ANSI C SIGINT, SIGTERM y SIGQUIT para que el server salga
[z.facultad/75.42/plaqui.git] / Server / src / connection.cpp
index c355c86d0cf7e195627e69e5afd1c5a7870197e6..31aaf1a4b0c3b5214e2485128732077f513c349b 100644 (file)
@@ -79,23 +79,20 @@ void Connection::finish(void) {
        cerr << __FILE__ << "(" << __LINE__ << ")"
                << ": finish();" << endl;
 #endif // DEBUG
        cerr << __FILE__ << "(" << __LINE__ << ")"
                << ": finish();" << endl;
 #endif // DEBUG
-       //socket_mutex.lock();
+       Runnable::finish();
        try {
        try {
+               // Para que el socket retorne el control, cierro sus canales de E/S.
                socket->shutdown(sockbuf::shut_readwrite);
                socket->shutdown(sockbuf::shut_readwrite);
-               // FIXME socket->close(sockbuf::shut_readwrite);
-               // close(socket->sd());
        } catch (const sockerr& e) {
                signal_error().emit(e.serrno(), e.errstr());
        }
        } catch (const sockerr& e) {
                signal_error().emit(e.serrno(), e.errstr());
        }
-       //socket_mutex.unlock();
-       Runnable::finish();
 }
 
 }
 
-const string& Connection::get_host(void) const {
+const string Connection::get_host(void) const {
        return host;
 }
 
        return host;
 }
 
-const Connection::Port& Connection::get_port(void) const {
+const Connection::Port Connection::get_port(void) const {
        return port;
 }
 
        return port;
 }