19 #include "uuid/telnet.h"
71 unsigned char c = data;
259 std::vector<unsigned char> data;
263 unsigned char c = *buffer++;
266 data.push_back((
unsigned char)
NUL);
270 data.push_back((
unsigned char)
IAC);
321 return raw_write(
reinterpret_cast<const unsigned char*
>(data.data()), data.size());
326 size_t remaining = size;
343 size_t len =
client_.write(buffer + offset, remaining);
344 if (len != remaining) {
348 }
else if (remaining > 0) {
static constexpr const unsigned char OPT_ECHO
unsigned char previous_in_
static constexpr const unsigned char DO
static constexpr const unsigned char DONT
void start()
Perform initial negotiation.
void buffer_flush()
Flush output stream buffer.
static constexpr const unsigned char BRK
static constexpr const unsigned char NUL
static constexpr const unsigned char AO
size_t write(uint8_t data) override
Write one byte to the output stream.
int raw_available()
Directly check for available input.
static constexpr const unsigned char AYT
static constexpr const unsigned char SB
void flush() override
Does nothing.
static constexpr const unsigned char SE
int read() override
Read one byte from the available input.
static constexpr const unsigned char WONT
static constexpr const unsigned char OPT_BINARY
static constexpr const unsigned char EC
int available() override
Check for available input.
static constexpr const unsigned char DM
static constexpr const unsigned char NOP
std::vector< char > output_buffer_
static constexpr const unsigned char WILL
unsigned char previous_raw_in_
static constexpr const unsigned char GA
static constexpr const size_t BUFFER_SIZE
unsigned char previous_out_
static constexpr const unsigned char LF
int raw_read()
Read one byte directly from the available input.
static constexpr const unsigned char OPT_SGA
static constexpr const unsigned char IP
static constexpr const unsigned char EL
TelnetStream(WiFiClient &client)
Create a new telnet stream wrapper.
int peek() override
Read one byte from the available input without advancing to the next one.
static constexpr const unsigned char IAC
size_t raw_write(unsigned char data)
Write one byte directly to the output stream.
static constexpr const unsigned char CR