From 598af2576c98e45161ca21662434423f349958cc Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 20 Jul 2015 18:50:29 +0000 Subject: Added a close function. It's nice to be able to close your connection whenever you want to. --- src/stable/protocoltelnet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/stable/protocoltelnet.cpp') diff --git a/src/stable/protocoltelnet.cpp b/src/stable/protocoltelnet.cpp index 9cf2a7b..77bc3dc 100644 --- a/src/stable/protocoltelnet.cpp +++ b/src/stable/protocoltelnet.cpp @@ -339,6 +339,12 @@ void Bu::ProtocolTelnet::flush() pClient->flush(); } +void Bu::ProtocolTelnet::close() +{ + Bu::MutexLocker l( mWrite ); + pClient->close(); +} + void Bu::ProtocolTelnet::onWill( char cCode ) { Bu::MutexLocker l( mWrite ); -- cgit v1.2.3