27 : setupFailed_ (false)
61 prefix_ void senf::term::TelnetTerminal::v_setupComplete()
67 else if (! (
width() > 0
72 && (init = callbacks_->
cb_init()))) {
75 log <<
"TelnetTerminal setup failed:\n";
77 log <<
" missing telnet client NAWS support\n";
79 log <<
" size=" <<
width() <<
"x" <<
height() <<
"\n";
81 log <<
" missing telnet client TERMINAL_TYPE support\n";
86 log <<
" missing telnet clinet SGO support\n";
88 log <<
" missing telnet client ECHO support\n";
90 log <<
" terminal initialization (cb_init) failed\n";
108 prefix_ void senf::term::TelnetTerminal::v_charReceived(
char ch)
113 prefix_ void senf::term::TelnetTerminal::v_windowSizeChanged()
BaseTelnetProtocol::option_type const SUPPRESS_GO_AHEAD
#define SENF_LOG_BLOCK(args)
virtual void cb_charReceived(char ch)=0
Called whenever a char is received.
bool localOption(option_type option)
true, if option locally enabled
void write(std::string const &s)
Send string to peer.
virtual std::string terminalType()
Get the terminal type.
void requestLocalOption(option_type option, bool enabled=true)
Request option to be enabled here.
std::string const & terminalType() const
Return current terminal type.
virtual void setCallbacks(AbstractTerminal::Callbacks &cb)
Register terminal callbacks.
AbstractTerminal callbacks.
virtual unsigned width() const
Get current terminal window width.
bool requestsPending()
true, if there are pending requests
virtual void v_setupFailed()=0
Called when the telnet setup has failed.
unsigned height() const
Get current client window height.
BaseTelnetProtocol::option_type const NAWS
virtual bool cb_init()=0
Called after terminal initialization is complete.
BaseTelnetProtocol::option_type const ECHO
virtual unsigned height() const
Get current terminal window height.
virtual void write(char ch)
Write character to terminal.
TelnetTerminal public header.
BaseTelnetProtocol::option_type const TERMINAL_TYPE
virtual void cb_windowSizeChanged()=0
Called when the terminal window is changed.
bool peerOption(option_type option)
true, if option enabled in peer
void requestPeerOption(option_type option, bool enabled=true)
Request peer to enable an option.
unsigned width() const
Get current client window width.