Skip to content

Commit c3f1211

Browse files
Update WiFiServer docs for ::write(all clients)
Fixes esp8266#5116 Fixes esp8266#2743 The Arduino WiFiClient object allows sending the same packet to all connected clients of a WiFiServer. In their implementation it may make sense, but on the 8266 with things like SSL it doesn't. Update the docs to note that WiFiServer::write() is a no-op, and that the app should use the WiFiCliebnt::write() on all connected clients as appropriate.
1 parent 705dd39 commit c3f1211

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/esp8266wifi/server-class.rst

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ Methods documented for the `Server Class <https://www.arduino.cc/en/Reference/Wi
1414

1515
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.
1616

17+
write (write to all clients) not supported
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
20+
Please note that the ``write`` method on the ``WiFiServer`` object is not implemented and returns failure always. Use the returned
21+
``WiFiClient`` object from the ``WiFiServer::available()`` method to communicate with individual clients. If you need to send
22+
the exact same packets to a series of clients, your application must maintain a list of connected clients and iterate over them manually.
23+
1724
setNoDelay
1825
~~~~~~~~~~
1926

0 commit comments

Comments
 (0)