From b610ac5183825a63fc9564ebe53e6691767b095f Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sun, 1 Nov 2015 12:20:12 +0100 Subject: [PATCH] added TcpConnection::close() method --- include/tcpconnection.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/tcpconnection.h b/include/tcpconnection.h index b3c18ba..1673193 100644 --- a/include/tcpconnection.h +++ b/include/tcpconnection.h @@ -112,6 +112,17 @@ public: * @param events What sort of events occured? */ void process(int fd, int flags); + + /** + * Close the connection + * This closes all channels and the TCP connection + * @return bool + */ + bool close() + { + // pass to the underlying connection + return _connection.close(); + } }; /**