-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undeprecate WiFiServer::available() #9027
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
do you want to implement the in esp8266 core https://github.com/JAndrassy/Arduino/blob/master/libraries/ESP8266WiFi/src/ArduinoWiFiServer.h |
@JAndrassy - We have discussed it and decided to follow WiFi Arduino API as much as possible. That's just it. If you consider worthy, please submit it upstream Arduino in their Github. We will follow! |
the Arduino Core API doesn't have anything about
|
https://www.arduino.cc/reference/en/libraries/wifi/server.available/ |
"Gets a client that is connected to the server AND has data available for reading" from the PagerServer example
in the next loop it can return the same client. going out of scope with client object doesn't close the connection |
This is the Arduino example that closes the client connection: void loop() {
// listen for incoming clients
WiFiClient client = server.available();
if (client) {
if (client.connected()) {
Serial.println("Connected to client");
}
// close the connection:
client.stop();
}
} |
This reverts commit 5d97e02.
Description of Change
Removes depricated message for WiFiServer::available() to follow Arduino upstream API.
Tests scenarios
None
Related links
None