Skip to content

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Nov 9, 2023

  • bool operator:
    https://www.arduino.cc/reference/en/libraries/ethernet/ifserver/

  • end():
    Not officially documented. Pay attention, when end() is called, the socket is not close immediately. The tcp connection will come into TCP_WAIT, after few minutes (~2 minutes) the connection will close completely and free the socket.
    So calling begin() during this time frame after the end() will silently failed and have to check thanks the bool operator if the server is ready or not. If not then call again begin().

For TCP_WAIT ref: https://github.com/stm32duino/LwIP/blob/4de72d4b92ebf1ac5ce5efe7c331c0af6d52cca3/src/core/tcp.c#L1446C11-L1446C11

Fixes #73.

Signed-off-by: Frederic Pillon <[email protected]>
Fixes stm32duino#73.

Signed-off-by: Frederic Pillon <[email protected]>
Fixes stm32duino#73.

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm added the enhancement New feature or request label Nov 9, 2023
@fpistm fpistm added this to the 1.3.1 milestone Nov 9, 2023
@fpistm fpistm merged commit f000a6e into stm32duino:main Nov 9, 2023
@fpistm fpistm deleted the ArduinoAPI branch November 9, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Consider adding method end() and operator bool() in EthernetServer
1 participant