Skip to content

Commit e518425

Browse files
ficetoficeto
ficeto
authored and
ficeto
committed
pull get/set NoDelay for WiFiClient
1 parent 6c6420e commit e518425

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ void ICACHE_FLASH_ATTR WiFiClient::_err(int8_t err)
123123
esp_schedule();
124124
}
125125

126+
127+
void ICACHE_FLASH_ATTR WiFiClient::setNoDelay(bool nodelay) {
128+
if (!_client)
129+
return;
130+
_client->setNoDelay(nodelay);
131+
}
132+
133+
bool ICACHE_FLASH_ATTR WiFiClient::getNoDelay() {
134+
if (!_client)
135+
return false;
136+
return _client->getNoDelay();
137+
}
138+
126139
size_t ICACHE_FLASH_ATTR WiFiClient::write(uint8_t b)
127140
{
128141
return write(&b, 1);

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class WiFiClient : public Client {
5555

5656
IPAddress remoteIP();
5757
uint16_t remotePort();
58+
bool getNoDelay();
59+
void setNoDelay(bool nodelay);
5860

5961
template<typename T> size_t write(T &src){
6062
uint8_t obuf[1460];

0 commit comments

Comments
 (0)