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

EthernetClient.connect - return only 1 or 0 #82

Merged
merged 1 commit into from
Jan 3, 2024
Merged

EthernetClient.connect - return only 1 or 0 #82

merged 1 commit into from
Jan 3, 2024

Conversation

JAndrassy
Copy link
Contributor

All examples have if (client.coonect(server, port), but getHostName doesn't return only 1 or 0, so connect can't return the return value of getHostName.

@fpistm fpistm self-requested a review January 2, 2024 14:58
@fpistm fpistm added this to the 1.4.1/1.5.0 milestone Jan 2, 2024
@fpistm
Copy link
Member

fpistm commented Jan 2, 2024

Hi @JAndrassy
Thanks for the PR, anyway it seems not correct as stated in the Arduino reference:
https://www.arduino.cc/reference/en/libraries/ethernet/client.connect/

image

@JAndrassy
Copy link
Contributor Author

JAndrassy commented Jan 2, 2024

that documentation is some hallucination. the Ethernet library never did that and no library by Arduino does that. and here WiFi libraries count too.
and all examples show if (client.connected)

my PR to fix the doc is arduino-libraries/Ethernet#240

@fpistm
Copy link
Member

fpistm commented Jan 3, 2024

OK. Thanks for the feedback... let's see if other user will claim for issue with this udate.

Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

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

@fpistm fpistm merged commit 52aba52 into stm32duino:main Jan 3, 2024
3 checks passed
@JAndrassy JAndrassy deleted the client_connect_return_0 branch January 3, 2024 09:29
@fpistm fpistm added the fix 🩹 Bug fix label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🩹 Bug fix
Projects
Development

Successfully merging this pull request may close these issues.

2 participants