diff options
author | Mike Buland <eichlan@xagasoft.com> | 2015-07-20 18:50:29 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2015-07-20 18:50:29 +0000 |
commit | 598af2576c98e45161ca21662434423f349958cc (patch) | |
tree | 1489111bed01573ec2e0e51944d6d140df20f14c /src/stable/protocoltelnet.cpp | |
parent | b5e1c2fba2b372aa19e1c857c176a175f30241d8 (diff) | |
download | libbu++-598af2576c98e45161ca21662434423f349958cc.tar.gz libbu++-598af2576c98e45161ca21662434423f349958cc.tar.bz2 libbu++-598af2576c98e45161ca21662434423f349958cc.tar.xz libbu++-598af2576c98e45161ca21662434423f349958cc.zip |
Added a close function. It's nice to be able to close your connection whenever
you want to.
Diffstat (limited to 'src/stable/protocoltelnet.cpp')
-rw-r--r-- | src/stable/protocoltelnet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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() | |||
339 | pClient->flush(); | 339 | pClient->flush(); |
340 | } | 340 | } |
341 | 341 | ||
342 | void Bu::ProtocolTelnet::close() | ||
343 | { | ||
344 | Bu::MutexLocker l( mWrite ); | ||
345 | pClient->close(); | ||
346 | } | ||
347 | |||
342 | void Bu::ProtocolTelnet::onWill( char cCode ) | 348 | void Bu::ProtocolTelnet::onWill( char cCode ) |
343 | { | 349 | { |
344 | Bu::MutexLocker l( mWrite ); | 350 | Bu::MutexLocker l( mWrite ); |