X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/b92547a5de3a3fb4f14a2bea4a4e776b8da3cb5c..29e4030c485d49ae79d491e7d0297899b9df6f73:/Server/src/connection.cpp diff --git a/Server/src/connection.cpp b/Server/src/connection.cpp index 408239e..1dc6b6d 100644 --- a/Server/src/connection.cpp +++ b/Server/src/connection.cpp @@ -57,6 +57,27 @@ Connection::Connection(sockbuf::type type): #endif // DEBUG } +void Connection::finish(bool attach) { + //socket_mutex.lock(); + socket->shutdown(sockbuf::shut_readwrite); + //socket_mutex.unlock(); + Runnable::finish(attach); +} + +string Connection::get_peerhost(void) { + //socket_mutex.lock(); + string host = socket->peerhost(); + //socket_mutex.unlock(); + return host; +} + +unsigned Connection::get_peerport(void) { + //socket_mutex.lock(); + unsigned port = socket->peerport(); + //socket_mutex.unlock(); + return port; +} + } // namespace Server } // namespace PlaQui