diff options
author | Mike Buland <eichlan@xagasoft.com> | 2015-08-22 18:27:31 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2015-08-22 18:27:31 +0000 |
commit | 61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a (patch) | |
tree | ab4e4a34193fdf3f0ab76ebce0b280a854410c74 /src/stable/protocoltelnet.cpp | |
parent | 13c4e8415e2f86e6dc389d6b53bd54aa1c50d8c2 (diff) | |
download | libbu++-61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a.tar.gz libbu++-61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a.tar.bz2 libbu++-61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a.tar.xz libbu++-61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a.zip |
Added some handy functions to inject data back into the telnet buffer.
This is great if you want to pre-fill a field, say.
Diffstat (limited to 'src/stable/protocoltelnet.cpp')
-rw-r--r-- | src/stable/protocoltelnet.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stable/protocoltelnet.cpp b/src/stable/protocoltelnet.cpp index f6fbd4b..51e33a8 100644 --- a/src/stable/protocoltelnet.cpp +++ b/src/stable/protocoltelnet.cpp | |||
@@ -347,6 +347,16 @@ void Bu::ProtocolTelnet::close() | |||
347 | pClient->close(); | 347 | pClient->close(); |
348 | } | 348 | } |
349 | 349 | ||
350 | void Bu::ProtocolTelnet::setBuffer( const Bu::String &sNewBuffer ) | ||
351 | { | ||
352 | sDataBuf = sNewBuffer; | ||
353 | } | ||
354 | |||
355 | void Bu::ProtocolTelnet::appendBuffer( const Bu::String &sNewData ) | ||
356 | { | ||
357 | sDataBuf += sNewData; | ||
358 | } | ||
359 | |||
350 | void Bu::ProtocolTelnet::onWill( char cCode ) | 360 | void Bu::ProtocolTelnet::onWill( char cCode ) |
351 | { | 361 | { |
352 | Bu::MutexLocker l( mWrite ); | 362 | Bu::MutexLocker l( mWrite ); |