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