File tree 2 files changed +4
-10
lines changed
libraries/ESP8266WiFi/src
2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -81,19 +81,11 @@ void WiFiServer::begin() {
81
81
}
82
82
83
83
void 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;
91
85
}
92
86
93
87
bool WiFiServer::getNoDelay () {
94
- if (!_pcb)
95
- return false ;
96
- return tcp_nagle_disabled (_pcb);
88
+ return _noDelay;
97
89
}
98
90
99
91
bool WiFiServer::hasClient () {
@@ -106,6 +98,7 @@ WiFiClient WiFiServer::available(byte* status) {
106
98
if (_unclaimed) {
107
99
WiFiClient result (_unclaimed);
108
100
_unclaimed = _unclaimed->next ();
101
+ result.setNoDelay (_noDelay);
109
102
DEBUGV (" WS:av\r\n " );
110
103
return result;
111
104
}
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class WiFiServer : public Server {
42
42
43
43
ClientContext* _unclaimed;
44
44
ClientContext* _discarded;
45
+ bool _noDelay = false ;
45
46
46
47
public:
47
48
WiFiServer (IPAddress addr, uint16_t port);
You can’t perform that action at this time.
0 commit comments