Telnet++
A C++ library for interacting with Telnet streams
core.hpp
1 #pragma once
2 
3 #include "telnetpp/detail/export.hpp"
4 #include <boost/cstdint.hpp>
5 #include <string>
6 
7 namespace telnetpp {
8 
9 using s8 = boost::int8_t;
10 using s16 = boost::int16_t;
11 using s32 = boost::int32_t;
12 using s64 = boost::int64_t;
13 
14 //* =========================================================================
18 //* =========================================================================
19 using u8 = boost::uint8_t;
20 using u16 = boost::uint16_t;
21 using u32 = boost::uint32_t;
22 using u64 = boost::uint64_t;
23 
24 // Originally, Telnet++ used std::vector<u8> as its stream type.
25 // However, most Telnet packets tend to be small, and this means that
26 // it's philosophically possible to use the Small Buffer Optimization.
27 // std::vector<> is specified such that it's impossible to implement the
28 // SBO, whereas std::string has the SBO for most implementations.
29 
30 // This may change in future to some other type, but it will always be
31 // something that models the basic standard Container concept.
32 
33 //* =========================================================================
38 //* =========================================================================
39 using u8stream = std::basic_string<u8>;
40 
41 }
Definition: byte_converter.hpp:4