X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/7e74b790d290cd7d776349503bb361c47933c01f..7ef672fd3601055cca3697fd0c4d534dbb9153c5:/Server/src/connection.cpp diff --git a/Server/src/connection.cpp b/Server/src/connection.cpp index 75915c9..31aaf1a 100644 --- a/Server/src/connection.cpp +++ b/Server/src/connection.cpp @@ -74,26 +74,25 @@ Connection::Connection(const std::string& host, const Port& port): #endif // DEBUG } -void Connection::finish(bool attach) { +void Connection::finish(void) { #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" - << ": finish(attach = " << attach << ")." << endl; + << ": finish();" << endl; #endif // DEBUG - //socket_mutex.lock(); + Runnable::finish(); try { + // Para que el socket retorne el control, cierro sus canales de E/S. socket->shutdown(sockbuf::shut_readwrite); } catch (const sockerr& e) { - error(e.serrno(), e.errstr()); + signal_error().emit(e.serrno(), e.errstr()); } - //socket_mutex.unlock(); - Runnable::finish(attach); } -const string& Connection::get_host(void) const { +const string Connection::get_host(void) const { return host; } -const Connection::Port& Connection::get_port(void) const { +const Connection::Port Connection::get_port(void) const { return port; }