mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-25 06:22:11 +03:00
TCP client flow control
This commit is contained in:
@ -36,6 +36,7 @@ int ICACHE_FLASH_ATTR Stream::timedRead()
|
||||
do {
|
||||
c = read();
|
||||
if (c >= 0) return c;
|
||||
yield();
|
||||
} while(millis() - _startMillis < _timeout);
|
||||
return -1; // -1 indicates timeout
|
||||
}
|
||||
@ -48,6 +49,7 @@ int ICACHE_FLASH_ATTR Stream::timedPeek()
|
||||
do {
|
||||
c = peek();
|
||||
if (c >= 0) return c;
|
||||
yield();
|
||||
} while(millis() - _startMillis < _timeout);
|
||||
return -1; // -1 indicates timeout
|
||||
}
|
||||
|
Reference in New Issue
Block a user