Telnet++  3.1.0.2
A C++ library for interacting with Telnet streams
Classes | Typedefs | Enumerations
telnetpp::options::new_environ Namespace Reference

An implementation of the Telnet Environment option. More...

Classes

class  client
 An implementation of the client side of the Telnet New-Environ option. More...
 
struct  request
 A request that is made of the remote server. More...
 
struct  response
 A response that is received from the remote server. More...
 
class  server
 An implementation of the server side of the Telnet New-Environ option. More...
 

Typedefs

using requests = gsl::span< request const >
 
using responses = gsl::span< response const >
 

Enumerations

enum class  variable_type { var , uservar }
 An enumeration of the type of variables that NEW_ENVIRON handles.
 

Detailed Description

An implementation of the Telnet Environment option.

Overview
NEW-ENVIRON is used to send the values of variables from server to client.
Variables are transmitted in pairs of telnetpp::options::new_environ::request and telnetpp::options::new_environ::response, where the request is the type of the variable (either a well known "var" type, the names of which are limited – see the specification), or a "uservar" type, which could have any name. The response may also contain a string if the variable existed.
Usage
Create a server or client as appropriate. Install it in a session, activate as normal.
A client may make a request of the server by calling request_variables(). It may also register for notifications about responses by subscribing to the on_variable_changed signal.
A server may set or delete variables and user variables, and will automatically handle requests sent from a client by using this data.
See also
https://tools.ietf.org/html/rfc1572