B4R Question Ethernet UDP cable disconnect

Discussion in 'B4R Questions' started by orpailleur, Apr 14, 2019.

  1. orpailleur

    orpailleur Member Licensed User

    How can i detect the cable disconnect in UDP, should i first detect Ethernet disconnect, after reconnect ethernet, then reconnect UDP ?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    SendPacket will return false if it failed to send the packet. This will happen when the network is not connected.
     
  3. orpailleur

    orpailleur Member Licensed User

    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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    SendPacket is relevant to UDP communication. With TCP it is different, you use AsyncStreams and handle the Error event.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice