O orpailleur Member Licensed User Apr 14, 2019 #1 How can i detect the cable disconnect in UDP, should i first detect Ethernet disconnect, after reconnect ethernet, then reconnect UDP ?
How can i detect the cable disconnect in UDP, should i first detect Ethernet disconnect, after reconnect ethernet, then reconnect UDP ?
Erel B4X founder Staff member Licensed User Longtime User Apr 14, 2019 #2 SendPacket will return false if it failed to send the packet. This will happen when the network is not connected. Upvote 0
SendPacket will return false if it failed to send the packet. This will happen when the network is not connected.
O orpailleur Member Licensed User Apr 14, 2019 #3 Thank you for your answer I suppose if the cable is disconnect and reconnect So long the arduino does not send UDP packet the arduino is not able to receive UDP packet from the PC. So the good way is to send a UDP packet as a watchdog. So i can use the FALSE return from the SendPacket for retry the connection ( ethernet and udp, or only udp ? ) Best regards Upvote 0
Thank you for your answer I suppose if the cable is disconnect and reconnect So long the arduino does not send UDP packet the arduino is not able to receive UDP packet from the PC. So the good way is to send a UDP packet as a watchdog. So i can use the FALSE return from the SendPacket for retry the connection ( ethernet and udp, or only udp ? ) Best regards
Erel B4X founder Staff member Licensed User Longtime User Apr 15, 2019 #4 SendPacket is relevant to UDP communication. With TCP it is different, you use AsyncStreams and handle the Error event. Upvote 0
SendPacket is relevant to UDP communication. With TCP it is different, you use AsyncStreams and handle the Error event.