Telnet++  3.1.0.2
A C++ library for interacting with Telnet streams
Public Member Functions | List of all members
telnetpp::server_option Class Reference

A class that represents a Telnet option's server side. That is, the side that receives DO and DONT negotiations and sends WILL and WONT negotiations. More...

#include <server_option.hpp>

Inheritance diagram for telnetpp::server_option:
telnetpp::options::basic_server< telnetpp::options::echo::detail::option > telnetpp::options::basic_server< detail::option > telnetpp::options::basic_server< telnetpp::options::suppress_ga::detail::option > telnetpp::options::basic_server< Option > telnetpp::options::echo::server telnetpp::options::msdp::server telnetpp::options::new_environ::server telnetpp::options::suppress_ga::server

Public Member Functions

constexpr server_option (telnetpp::session &sess, telnetpp::option_type code) noexcept
 

Detailed Description

A class that represents a Telnet option's server side. That is, the side that receives DO and DONT negotiations and sends WILL and WONT negotiations.

Server vs. Client
Note that the usage of server in this context may disagree with a particular option's RFC specification. The determination of what is a client and what is a server is not rigorously applies throughout the RFCs, so consider this merely an implementation detail of this library.
Usage
server_option provides a general interface to enable the implementation of the server sides of all Telnet options. There are two customization points that must be filled in before an implementation is complete:
  • the derived class must call the constructor, passing in a value that is the Option Code for the feature being implemented.
  • the derived class must implement the handle_subnegotiation function. This is called whenever data specific to the option passes through the Telnet layer.
A final third customization point is the on_state_changed signal, to which a user can connect to have functionality executed when the option changes state.
See also
https://tools.ietf.org/html/std8

The documentation for this class was generated from the following file: