User Manual

Parameters: None
Returns: The first byte of incoming data available, or -1 if no data is available.
int read (uint8_t * buf, size_t size)
Reads up to the specified number of bytes from the data buffer (if any data is available).
Parameters:
buf: A pointer to the buffer where data should be written if any data is available
size: The maximum number of bytes to read and copy into buf.
Returns: The actual number of bytes read back, and written in buf.
size_t write (uint8_t data)
Transmits a single byte to the TCP Server (or into the outgoing buffer until it can be sent if buffering is enabled).
Parameters:
data: The byte of data to transmit
Returns: The number of bytes written. It is normally not necessary to read this value.
size_t write (const uint8_t *content, size_t len)
Transmits a number of bytes to the TCP Server (or into the outgoing buffer until the data can be sent if buffering is
enabled).
Parameters:
content: A pointer to the buffer containing the data to send
len: The number of bytes contained in content
Returns: The number of bytes successfully written.
int available (void)
Checks the number of bytes available in the incoming data buffer.
Parameters: None
Returns: The number of bytes available in the incoming data buffer, or 0 if no data is available.
int peek (void)
Reads the first available byte from the incoming data buffer without removing it from the buffer.
Parameters: None
Returns: The value of the first available byte, or -1 if no data is available.
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 78 of 202