Open fogzot opened 9 months ago
yes. the networking libraries in mbed core implement server.available()
as server.accep()
.
if you need proper server.available() you can use ArduinoEthernetServer from my NetApiHelpers library. (works only with the latest mbed core release)
What about updating the documentation with this information? The docs sent me on a wild bug chase in my code before I guessed that there was an error in the library. And, IMHO, if the documentation says "A" and on every other platform it is "A", having it as "B" on mbed is a bug.
I guess you were looking at the Wiznet W5x00 Ethernet library documentation, because the Mbed Core Ethernet library is not documented
Well, no. I am looking at the official documentation for the Ethernet library:
https://www.arduino.cc/reference/en/libraries/ethernet/
That reads:
This library is compatible with all architectures so you should be able to use it on all the Arduino boards.
If a different, undocumented library exists and is used instead of the "official" one when i put #include <Ethernet.h>
in my sketch, how am I supposed to know?
Opta doesn't use this library here. it uses the bundled Ethernet library from Mbed Core https://github.com/arduino/ArduinoCore-mbed/tree/main/libraries/Ethernet
The documentation for
server.available()
says:But in the following code the connection is closed immediately at the end of the scope:
The connection is supposed to persist across invocations of
loop()
but if one tries to connect (telnet 192.168.3.2
) it is disconncted immediately.