Description
Basic Infos
So I tried searching if this issue is already present but due to the mass it could be that I overlooked it, so apologies if this is a duplicate report.
Description
The WiFiServer currently doesn't support writing to all clients. Instead one has to keep track of the client instances and do that manually which leads to a bit more ugly code.
See: WiFiServer.cpp#L135
I would file a pull request but since I am no C++ expert, the list code is hard to read.
In general I would recommend refactoring the code to be in line with the Arduino's EthernetServer.
The key difference is that it handles the client array internally, hiding it from the user.
This means that available
always returns the first readable client instead of only returning new connections like WiFiServer
does.
I agree that this is a design decision and that it would break exisiting code, so this is soley a proposal, but since I had to rewrite some code depending on the Platform (Arduino Mega vs ESP it would be awesome to have that consistent.