You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/esp8266wifi/client-class.rst
+52-1
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,17 @@ Methods documented for `Client <https://www.arduino.cc/en/Reference/WiFiClientCo
18
18
19
19
Methods and properties described further down are specific to ESP8266. They are not covered in `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__ documentation. Before they are fully documented please refer to information below.
20
20
21
+
flush and stop
22
+
~~~~~~~~~~~~~~
23
+
24
+
``flush(timeoutMs)`` and ``stop(timeoutMs)`` both have now an optional argument: ``timeout`` in millisecond, and both return a boolean.
25
+
26
+
Default input value 0 means that effective value is left at the discretion of the implementer.
27
+
28
+
``flush()`` returning ``true`` indicates that output data have effectively been sent, and ``false`` that a timeout has occurred.
29
+
30
+
``stop()`` returns ``false`` in case of an issue when closing the client (for instance a timed-out ``flush``). Depending on implementation, its parameter can be passed to ``flush()``.
31
+
21
32
setNoDelay
22
33
~~~~~~~~~~
23
34
@@ -35,6 +46,47 @@ This algorithm is intended to reduce TCP/IP traffic of small packets sent over t
35
46
36
47
client.setNoDelay(true);
37
48
49
+
getNoDelay
50
+
~~~~~~~~~~
51
+
52
+
Returns whether NoDelay is enabled or not for the current connection.
53
+
54
+
setSync
55
+
~~~~~~~
56
+
57
+
This is an experimental API that will set the client in synchronized mode.
58
+
In this mode, every ``write()`` is flushed. It means that after a call to
59
+
``write()``, data are ensured to be received where they went sent to (that is
60
+
``flush`` semantic).
61
+
62
+
When set to ``true`` in ``WiFiClient`` implementation,
63
+
64
+
- It slows down transfers, and implicitely disable the Nagle algorithm.
65
+
66
+
- It also allows to avoid a temporary copy of data that otherwise consumes
67
+
at most ``TCP_SND_BUF`` = (2 * ``MSS``) bytes per connection,
68
+
69
+
getSync
70
+
~~~~~~~
71
+
72
+
Returns whether Sync is enabled or not for the current connection.
73
+
74
+
setDefaultNoDelay and setDefaultSync
75
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
+
77
+
These set the default value for both ``setSync`` and ``setNoDelay`` for
78
+
every future instance of ``WiFiClient`` (including those coming from
79
+
``WiFiServer.available()`` by default).
80
+
81
+
Default values are false for both ``NoDelay`` and ``Sync``.
82
+
83
+
This means that Nagle is enabled by default *for all new connections*.
84
+
85
+
getDefaultNoDelay and getDefaultSync
86
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87
+
88
+
Return the values to be used as default for NoDelay and Sync for all future connections.
89
+
38
90
Other Function Calls
39
91
~~~~~~~~~~~~~~~~~~~~
40
92
@@ -54,7 +106,6 @@ Other Function Calls
54
106
uint16_t remotePort ()
55
107
IPAddress localIP ()
56
108
uint16_t localPort ()
57
-
bool getNoDelay ()
58
109
59
110
Documentation for the above functions is not yet prepared.
0 commit comments