Telnet++ 4.0.1.7
A C++ library for interacting with Telnet streams
Loading...
Searching...
No Matches
server.hpp
1#pragma once
2
3#include "telnetpp/options/charset/detail/protocol.hpp"
4#include "telnetpp/server_option.hpp"
5
6#include <boost/signals2.hpp>
7
8#include <vector>
9
10namespace telnetpp::options::charset {
11
12//* =========================================================================
14//* =========================================================================
15class TELNETPP_EXPORT server final : public telnetpp::server_option
16{
17public:
18 //* =====================================================================
20 //* =====================================================================
21 explicit server(telnetpp::session &sess) noexcept;
22
23 //* =====================================================================
25 //* =====================================================================
26 void request_charsets();
27
28 //* =====================================================================
30 //* =====================================================================
31 void select_charset(telnetpp::bytes charset);
32
33 boost::signals2::signal<void(
34 std::vector<telnetpp::byte_storage> const &)>
35 on_charsets_advertised; // NOLINT
36
37 boost::signals2::signal<void(telnetpp::bytes)>
38 on_charset_selected; // NOLINT
39
40private:
41 //* =====================================================================
44 //* =====================================================================
45 void handle_subnegotiation(telnetpp::bytes data) override;
46};
47
48} // namespace telnetpp::options::charset
An implementation of the server side of the Telnet CHARSET option.
Definition server.hpp:16
A class that represents a Telnet option's server side. That is, the side that receives DO and DONT ne...
Definition server_option.hpp:35
An abstraction for a Telnet session.
Definition session.hpp:141