Telnet++ 4.0.0.9
A C++ library for interacting with Telnet streams
Loading...
Searching...
No Matches
server.hpp
1#pragma once
2
3#include "telnetpp/options/basic_server.hpp"
4#include "telnetpp/options/naws/detail/protocol.hpp"
5
6#include <optional>
7#include <utility>
8
10
11//* =========================================================================
13//* =========================================================================
14class TELNETPP_EXPORT server
15 : public telnetpp::options::basic_server<detail::option>
16{
17public:
18 using window_dimension = std::uint16_t;
19
20 //* =====================================================================
22 //* =====================================================================
23 explicit server(telnetpp::session &sess);
24
25 //* =====================================================================
27 //* =====================================================================
28 void set_window_size(window_dimension width, window_dimension height);
29
30private:
31 //* =====================================================================
33 //* =====================================================================
34 void report_window_size();
35
36 std::optional<std::pair<window_dimension, window_dimension>> window_size_;
37};
38
39} // namespace telnetpp::options::naws
A class template that generates basic classes that handle no subnegotiations; they merely exist for e...
Definition basic_server.hpp:14
An implementation of the server side of the Telnet NAWS option.
Definition server.hpp:16
An abstraction for a Telnet session.
Definition session.hpp:141
An implementation of the standard Telnet Negotiate About Window Size option.
Definition client.hpp:7