-
Notifications
You must be signed in to change notification settings - Fork 519
[ch1668] UDP socket validity check #766
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
Conversation
This is great. Would you mind adding docs and tests to support this change? Details are in our contributions doc - https://github.com/spark/firmware/blob/develop/CONTRIBUTING.md. Thanks! |
So far not so much time for the full chain, I'll do my best. |
Any objections to merging this? In our discussions on logging today, calling read/write and other operations on TCP/UDP objects that are not valid is a good example of where we'd emit a WARN or ERROR log. |
no of course no objections |
@aledand - would you please sign our CLA - https://docs.google.com/a/particle.io/forms/d/1_2P-vRKGUFg5bmpcKLHO_qNZWGi5HKYnfrrkd-sbZoA/viewform. For consistency, we should add an |
done Il giorno mer 27 apr 2016 alle ore 23:21 Matthew [email protected]
|
Closing until tests can be added for this. Added to Clubhouse 1667. |
We currently have TCPClient::status() that acts this way, validating the TCP socket, although it needs to be documented (particle-iot/docs#569). Perhaps this PR should rename the API to UDP::status() and && it with .ready() like TCP does and use the For reference, TCPClient::status() is
So proposed UDP::status() would be
Unclear if This would address issue #1243 |
Hi, sorry for posting in a closed topic. |
What's the current status of this? This is closed, but the PR for documenting these calls is open and it seems neither |
Hi @stewartadam I am not sure what is up with this pull req, but I did want to make two points:
|
sockets become invalid after a WiFi reconnect. this should let user code to check it.