Skip to content

Conversation

pennam
Copy link
Contributor

@pennam pennam commented Jun 27, 2024

This PR makes connected() consider also network status. In some conditions: WiFi turning ON and OFF or Ethernet cable connections and disconnections connected() returns 1 even if network is in reality disconnected.

Also status() is a bit confusing so i make it private, users can still check Client status using connected()

@JAndrassy
Copy link
Contributor

JAndrassy commented Jun 27, 2024

please let status() public. connected() returns true if data are available, which is not useful for sending.
in the W5500 Ethernet library status() even allows async connect if the connect timeout is low or zero.

https://github.com/Networking-for-Arduino/Arduino-Networking-API/blob/main/ArduinoNetAPIDev.md#status-optional

@pennam pennam force-pushed the client-network-check branch from 4aff80b to 636b20e Compare June 27, 2024 09:44
@pennam pennam merged commit e707506 into arduino:main Jun 28, 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.

2 participants