1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-23 19:21:59 +03:00

Fixed wrong behaviour of EthernetClient::flush().

Fixes #1576
This commit is contained in:
Cristian Maglie
2013-09-23 15:46:51 +02:00
parent db640e08cd
commit 88def54082
5 changed files with 15 additions and 2 deletions

View File

@ -120,8 +120,7 @@ int EthernetClient::peek() {
}
void EthernetClient::flush() {
while (available())
read();
::flush(_sock);
}
void EthernetClient::stop() {

View File

@ -13,6 +13,7 @@ extern int16_t recv(SOCKET s, uint8_t * buf, int16_t len); // Receive data (TCP)
extern uint16_t peek(SOCKET s, uint8_t *buf);
extern uint16_t sendto(SOCKET s, const uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t port); // Send data (UDP/IP RAW)
extern uint16_t recvfrom(SOCKET s, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t *port); // Receive data (UDP/IP RAW)
extern void flush(SOCKET s); // Wait for transmission to complete
extern uint16_t igmpsend(SOCKET s, const uint8_t * buf, uint16_t len);