3 months ago.
How to make restart UDP Socket if cable was unpluged?
I have UDP communication with Static IP between two NucleoF767ZI and encountered problem if I unplug cable and plug it again Ethernet communication never restores.
Can anybody advice how to check if connection was lost? (may be through mbedEvents) and how to restart UDP Socket ?
Thank you, Daniel
2 months ago.
So, UDP is just fire-and-forget, so there's not really a thing as 'restarting a socket'. There's no communication between the two nodes to set up the connection.
If you need to be sure that the communication channel is still there, use TCP and look for the error codes when calling send/recv (or use the events that the socket gives you).
To post an answer, please log in.