3 #include "telnetpp/detail/export.hpp"
5 #include <gsl/gsl-lite.hpp>
12 using byte = std::uint8_t;
13 using option_type = std::uint8_t;
14 using command_type = std::uint8_t;
15 using negotiation_type = std::uint8_t;
16 using subnegotiation_content_type = byte;
19 static constexpr command_type
const se = 240;
20 static constexpr command_type
const nop = 241;
21 static constexpr command_type
const dm = 242;
22 static constexpr command_type
const brk = 243;
23 static constexpr command_type
const ip = 244;
24 static constexpr command_type
const ao = 245;
25 static constexpr command_type
const ayt = 246;
26 static constexpr command_type
const ec = 247;
27 static constexpr command_type
const el = 248;
28 static constexpr command_type
const ga = 249;
29 static constexpr command_type
const sb = 250;
30 static constexpr command_type
const will = 251;
31 static constexpr command_type
const wont = 252;
32 static constexpr command_type
const do_ = 253;
33 static constexpr command_type
const dont = 254;
34 static constexpr command_type
const iac = 255;
41 using bytes = gsl::span<byte const>;
45 using byte_storage = std::basic_string<byte>;
50 inline byte_storage
operator""_tb(
char const *text,
size_t length)
53 result.reserve(length);
55 for (
auto ch : gsl::span<char const>{text, length})
57 result.push_back(
static_cast<telnetpp::byte
>(ch));