Telnet++
A C++ library for interacting with Telnet streams
server.hpp
1 #pragma once
2 
3 #include "telnetpp/server_option.hpp"
4 #include <boost/optional.hpp>
5 #include <map>
6 
7 namespace telnetpp { namespace options { namespace new_environ {
8 
9 //* =========================================================================
12 //* =========================================================================
13 class TELNETPP_EXPORT server : public server_option
14 {
15 public :
16  //* =====================================================================
18  //* =====================================================================
19  server();
20 
21  //* =====================================================================
23  //* =====================================================================
24  std::vector<telnetpp::token> set_variable(
25  std::string const &name, std::string const &value);
26 
27  //* =====================================================================
29  //* =====================================================================
30  std::vector<telnetpp::token> delete_variable(std::string const &name);
31 
32  //* =====================================================================
34  //* =====================================================================
35  std::vector<telnetpp::token> set_user_variable(
36  std::string const &name, std::string const &value);
37 
38  //* =====================================================================
40  //* =====================================================================
41  std::vector<telnetpp::token> delete_user_variable(std::string const &name);
42 
43 private :
44  //* =====================================================================
47  //* =====================================================================
48  std::vector<telnetpp::token> handle_subnegotiation(u8stream const &content);
49 
50  std::map<std::string, std::string> variables_;
51  std::map<std::string, std::string> user_variables_;
52 };
53 
54 }}}
An implementation of the server side of the Telnet New-Environ option.
Definition: server.hpp:13
A collection of bytes that models the Standard Library&#39;s Container concept.
A class that represents a Telnet option&#39;s server side.
Definition: server_option.hpp:34
Definition: byte_converter.hpp:4