1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-29 18:52:13 +01: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

@ -4,6 +4,7 @@ ARDUINO 1.5.5 BETA
[libraries]
* avr: Fixed buffer overflow in File::doBuffer() (dreggy)
* avr: Fixed timeout in Bridge::transfer()
* avr: Fixed behavior of EthernetClient::flush()
ARDUINO 1.5.4 BETA 2013.09.10

View File

@ -310,6 +310,12 @@ uint16_t recvfrom(SOCKET s, uint8_t *buf, uint16_t len, uint8_t *addr, uint16_t
return data_len;
}
/**
* @brief Wait for buffered transmission to complete.
*/
void flush(SOCKET s) {
// TODO
}
uint16_t igmpsend(SOCKET s, const uint8_t * buf, uint16_t len)
{

View File

@ -310,6 +310,12 @@ uint16_t recvfrom(SOCKET s, uint8_t *buf, uint16_t len, uint8_t *addr, uint16_t
return data_len;
}
/**
* @brief Wait for buffered transmission to complete.
*/
void flush(SOCKET s) {
// TODO
}
uint16_t igmpsend(SOCKET s, const uint8_t * buf, uint16_t len)
{

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);