File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -81,19 +81,11 @@ void WiFiServer::begin() {
8181}
8282
8383void WiFiServer::setNoDelay (bool nodelay) {
84- if (!_pcb)
85- return ;
86-
87- if (nodelay)
88- tcp_nagle_disable (_pcb);
89- else
90- tcp_nagle_enable (_pcb);
84+ _noDelay = nodelay;
9185}
9286
9387bool WiFiServer::getNoDelay () {
94- if (!_pcb)
95- return false ;
96- return tcp_nagle_disabled (_pcb);
88+ return _noDelay;
9789}
9890
9991bool WiFiServer::hasClient () {
@@ -106,6 +98,7 @@ WiFiClient WiFiServer::available(byte* status) {
10698 if (_unclaimed) {
10799 WiFiClient result (_unclaimed);
108100 _unclaimed = _unclaimed->next ();
101+ result.setNoDelay (_noDelay);
109102 DEBUGV (" WS:av\r\n " );
110103 return result;
111104 }
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class WiFiServer : public Server {
4242
4343 ClientContext* _unclaimed;
4444 ClientContext* _discarded;
45+ bool _noDelay = false ;
4546
4647public:
4748 WiFiServer (IPAddress addr, uint16_t port);
You can’t perform that action at this time.
0 commit comments