Skip to content

Conversation

@JAndrassy
Copy link
Contributor

I did a research how different Arduino networking libraries implement the Arduino networking API.
https://github.com/JAndrassy/Arduino-Networking-API/blob/main/ArduinoNetAPILibs.md#server-class

For most libraries it is simpler to implement operator bool() than the method status() with its return value constants. So this PR adds bool operator for WiFiServer in the ESP8266Wifi library.

In the research I find out that end() is the most popular name for the function to stop the server and Arduino now used it too in the new WiFiS3 library.

@earlephilhower
Copy link
Collaborator

earlephilhower commented Sep 24, 2023

That's a darn odd failure in CI. I have no idea what's going on there w/host builds and don't think it's related to this at all.

That said, maybe add those methods to wired Ethernet too? https://github.com/esp8266/Arduino/blob/master/cores/esp8266/LwipIntfDev.h My bad, not related.

Would you also like to do the same PR for https://github.com/earlephilhower/arduino-pico ? I could add the add'l functions, but since you've identified the problem I don't want to steal your thunder. We now have wired and WiFi support there, stolen borrowed from here. 😆

@JAndrassy
Copy link
Contributor Author

@earlephilhower I already do to many PR and write issues as a result of the research. Most of the [PR] and [issue] links in the document are my PR and issues. Please do the changes in the Pico core.

btw I didn't include the libraries from pico core in the research since the WiFi is only for Pico W and the libraries for wired Ethernet were not ready when I started :-)

Copy link
Collaborator

@mcspr mcspr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same q as above, don't we want this in Server base?
Otherwise, same thing must be copied to Lwip server implementations

@d-a-v d-a-v merged commit 30c6df4 into esp8266:master Nov 4, 2023
@JAndrassy JAndrassy deleted the wifi_server_op_bool branch November 5, 2023 07:56
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants