Skip to content
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

MbedClient add network status check #907

Merged
merged 2 commits into from
Jun 28, 2024
Merged

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 merged commit e707506 into arduino:main Jun 28, 2024
11 checks passed
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.

None yet

2 participants