1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

add TCP_NODELAY control

This commit is contained in:
ficeto
2015-05-12 19:25:37 +03:00
parent 669609f3d7
commit f2f1fad298
3 changed files with 25 additions and 1 deletions

View File

@ -98,7 +98,18 @@ class ClientContext {
delete this;
}
}
void setNoDelay(bool nodelay){
if(!_pcb) return;
if(nodelay) tcp_nagle_disable(_pcb);
else tcp_nagle_enable(_pcb);
}
bool getNoDelay(){
if(!_pcb) return false;
return tcp_nagle_disabled(_pcb);
}
uint32_t getRemoteAddress() {
if(!_pcb) return 0;