Implement TERMINAL_TYPE option. More...
#include <senf/Utils/Termlib/Telnet.hh>
Public Member Functions | |
void | nextTerminalType () |
Request another terminal type. More... | |
std::string const & | terminalType () const |
Return current terminal type. More... | |
Public Member Functions inherited from senf::term::BaseTelnetProtocol::TelnetHandler | |
virtual | ~TelnetHandler () |
Public Member Functions inherited from senf::term::BaseTelnetProtocol | |
void | write (std::string const &s) |
Send string to peer. More... | |
void | write (char c) |
Send single character to peer. More... | |
Handle | handle () |
Get socket handle. More... | |
void | sendNOP () |
Send NOP to peer. More... | |
void | sendBRK () |
Send BReaK to peer. More... | |
void | sendIP () |
Send InterruptProcess to peer. More... | |
void | sendAO () |
Send AbortOutput to peer. More... | |
void | sendAYT () |
Send AreYouThere to peer. More... | |
void | sendEC () |
Send EraseCharacter to peer. More... | |
void | sendEL () |
Send EraseLine to peer. More... | |
void | sendGA () |
Send GoAhead to peer. More... | |
void | sendOptionParameters (option_type option, std::string const &data) |
Send extended option parameter to peer. More... | |
void | requestLocalOption (option_type option, bool enabled=true) |
Request option to be enabled here. More... | |
void | acceptLocalOption (option_type option, bool enabled=true) |
Accept a request for an option to be enabled here. More... | |
void | requestPeerOption (option_type option, bool enabled=true) |
Request peer to enable an option. More... | |
void | acceptPeerOption (option_type option, bool enabled=true) |
Accept a request by the peer to enable an option. More... | |
bool | localOption (option_type option) |
true , if option locally enabled More... | |
bool | peerOption (option_type option) |
true , if option enabled in peer More... | |
Static Public Attributes | |
static option_type const | OPTION_CODE = telnetopt::TERMINAL_TYPE |
Static Public Attributes inherited from senf::term::BaseTelnetProtocol | |
static unsigned const | DEFAULT_REQUEST_TIMEOUT_MS = 500u |
Protected Member Functions | |
TerminalType () | |
Protected Member Functions inherited from senf::term::BaseTelnetProtocol | |
BaseTelnetProtocol (Handle handle) | |
Construct telnet protocol handler. More... | |
BaseTelnetProtocol () | |
Provided for TelnetHandler mixins only. More... | |
virtual | ~BaseTelnetProtocol () |
template<class Handler > | |
void | registerHandler (Handler *h, bool request=true) |
Register a TelnetHandler. More... | |
void | incrementRequestCounter () |
Increment request counter. More... | |
void | decrementRequestCounter () |
Decrement request counter. More... | |
bool | requestsPending () |
true , if there are pending requests More... | |
virtual void | v_setupComplete ()=0 |
Called, when no further requests are pending. More... | |
virtual void | v_charReceived (char c)=0 |
Called whenever a data character is received. More... | |
virtual void | v_eof ()=0 |
Called on input EOF. More... | |
virtual void | v_handleNOP () |
Called, when the peer sends a NOP. More... | |
virtual void | v_handleBRK () |
Called, when the peer sends a BReaK. More... | |
virtual void | v_handleIP () |
Called, when the peer sends an InterruptProcess. More... | |
virtual void | v_handleAO () |
Called, when the peer sends an AbortOutput. More... | |
virtual void | v_handleAYT () |
Called, when the peer sends an AreYouThere. More... | |
virtual void | v_handleEC () |
Called, when the peer sends an EraseCharacter. More... | |
virtual void | v_handleEL () |
Called, when the peer sends an EraseLine. More... | |
virtual void | v_handleGA () |
Called, when the peer sends a GoAhead. More... | |
Additional Inherited Members | |
Public Types inherited from senf::term::BaseTelnetProtocol | |
typedef ClientSocketHandle< senf::MakeSocketPolicy< ConnectedCommunicationPolicy, StreamFramingPolicy, ReadablePolicy, WriteablePolicy >::policy > | Handle |
Type of socket handle required. More... | |
typedef unsigned char | option_type |
Type of telnet option numbers. More... | |
Implement TERMINAL_TYPE option.
This telnet handler implements the TERMINAL_TYPE option. The handler automatically requests the first terminal type during initialization. Further terminal types may then be requested by calling nextTerminalType().
The last received terminal type will be returned by the terminalType() member.
This implementation only provides server support (querying the terminal type).
|
protected |
void senf::term::telnethandler::TerminalType::nextTerminalType | ( | ) |
std::string const& senf::term::telnethandler::TerminalType::terminalType | ( | ) | const |
Return current terminal type.
|
static |