1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Adding Client::peek() in Ethernet library (issue #349).

This commit is contained in:
David A. Mellis
2010-09-16 01:11:19 +00:00
parent 76641d1a87
commit ea8a1182b8
6 changed files with 30 additions and 4 deletions

View File

@ -158,6 +158,19 @@ uint16_t recv(SOCKET s, uint8_t *buf, uint16_t len)
}
/**
* @brief Returns the first byte in the receive queue (no checking)
*
* @return
*/
uint16_t peek(SOCKET s, uint8_t *buf)
{
W5100.recv_data_processing(s, buf, 1, 1);
return 1;
}
/**
* @brief This function is an application I/F function which is used to send the data for other then TCP mode.
* Unlike TCP transmission, The peer's destination address and the port is needed.