File tree 3 files changed +25
-1
lines changed
hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,17 @@ void WiFiServer::begin()
73
73
tcp_arg (listen_pcb, (void *) this );
74
74
}
75
75
76
+ void WiFiServer::setNoDelay (bool nodelay){
77
+ if (!_pcb) return ;
78
+ if (nodelay) tcp_nagle_disable (_pcb);
79
+ else tcp_nagle_enable (_pcb);
80
+ }
81
+
82
+ bool WiFiServer::getNoDelay (){
83
+ if (!_pcb) return false ;
84
+ return tcp_nagle_disabled (_pcb);
85
+ }
86
+
76
87
extern " C" uint32_t esp_micros_at_task_start ();
77
88
78
89
bool WiFiServer::hasClient (){
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ class WiFiServer : public Server {
46
46
WiFiClient available (uint8_t * status = NULL );
47
47
bool hasClient ();
48
48
void begin ();
49
+ void setNoDelay (bool nodelay);
50
+ bool getNoDelay ();
49
51
virtual size_t write (uint8_t );
50
52
virtual size_t write (const uint8_t *buf, size_t size);
51
53
uint8_t status ();
Original file line number Diff line number Diff line change @@ -98,7 +98,18 @@ class ClientContext {
98
98
delete this ;
99
99
}
100
100
}
101
-
101
+
102
+ void setNoDelay (bool nodelay){
103
+ if (!_pcb) return ;
104
+ if (nodelay) tcp_nagle_disable (_pcb);
105
+ else tcp_nagle_enable (_pcb);
106
+ }
107
+
108
+ bool getNoDelay (){
109
+ if (!_pcb) return false ;
110
+ return tcp_nagle_disabled (_pcb);
111
+ }
112
+
102
113
uint32_t getRemoteAddress () {
103
114
if (!_pcb) return 0 ;
104
115
You can’t perform that action at this time.
0 commit comments