Telnet++
A C++ library for interacting with Telnet streams
subnegotiation_router.hpp
1 #pragma once
2 
3 #include "telnetpp/detail/router.hpp"
4 #include "telnetpp/subnegotiation.hpp"
5 #include "telnetpp/element.hpp"
6 #include <vector>
7 
8 namespace telnetpp { namespace detail {
9 
10 struct subnegotiation_router_key_from_message_policy
11 {
12  static telnetpp::u8 key_from_message(subnegotiation const &sub)
13  {
14  return sub.option();
15  }
16 };
17 
18 class subnegotiation_router
19  : public router<
20  u8,
21  subnegotiation,
22  std::vector<telnetpp::token>,
23  detail::subnegotiation_router_key_from_message_policy
24  >
25 {
26 };
27 
28 }}
Definition: byte_converter.hpp:4