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 IAC
int raw_read()
Read one byte directly from the available input.
static constexpr const unsigned char IP
static constexpr const unsigned char OPT_SGA
unsigned char previous_raw_in_
size_t raw_write(unsigned char data)
Write one byte directly to the output stream.
static constexpr const unsigned char NOP
static constexpr const unsigned char LF
static constexpr const unsigned char WILL
static constexpr const unsigned char AYT
size_t write(uint8_t data) override
Write one byte to the output stream.
static constexpr const unsigned char DM
static constexpr const unsigned char CR
static constexpr const unsigned char SB
unsigned char previous_in_
static constexpr const unsigned char DONT
int available() override
Check for available input.
static constexpr const unsigned char GA
int read() override
Read one byte from the available input.
void buffer_flush()
Flush output stream buffer.
TelnetStream(WiFiClient &client)
Create a new telnet stream wrapper.
static constexpr const unsigned char BRK
static constexpr const unsigned char WONT
static constexpr const unsigned char NUL
static constexpr const unsigned char EC
std::vector< char > output_buffer_
static constexpr const unsigned char OPT_ECHO
static constexpr const unsigned char OPT_BINARY
void flush() override
Does nothing.
int raw_available()
Directly check for available input.
int peek() override
Read one byte from the available input without advancing to the next one.
static constexpr const size_t BUFFER_SIZE
unsigned char previous_out_
static constexpr const unsigned char DO
static constexpr const unsigned char AO
static constexpr const unsigned char SE
static constexpr const unsigned char EL
void start()
Perform initial negotiation.