From 61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 22 Aug 2015 18:27:31 +0000 Subject: Added some handy functions to inject data back into the telnet buffer. This is great if you want to pre-fill a field, say. --- src/stable/protocoltelnet.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/stable/protocoltelnet.cpp') 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() pClient->close(); } +void Bu::ProtocolTelnet::setBuffer( const Bu::String &sNewBuffer ) +{ + sDataBuf = sNewBuffer; +} + +void Bu::ProtocolTelnet::appendBuffer( const Bu::String &sNewData ) +{ + sDataBuf += sNewData; +} + void Bu::ProtocolTelnet::onWill( char cCode ) { Bu::MutexLocker l( mWrite ); -- cgit v1.2.3