Re: Lost network connection detection



Basically, the general suggestion is to check the return values of
sendto(...) function - if the packet was sent at user mode. But one has to
define "absence of network": UDP packet can be discarded before it gets sent
to network. Also, the fact, that the packet is sent, does not mean that it
will be delivered, or delivered in proper sequence.

What I actually investigated, is that on a bit lower level, at TDI one may
get the following error codes when sending UDP packets (error codes observed
from completion routine which was set for each TDI_SEND_DATAGRAM IRP):

STATUS_HOST_UNREACHABLE, STATUS_IO_TIMEOUT, STATUS_CANCELLED,
NT_STATUS_NETWORK_UNREACHABLE, STATUS_INSUFFICIENT_RESOURCES

I hope this will help.

--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Void" <Void@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:839D95EF-604B-48F9-ADB3-C3D7F7285242@xxxxxxxxxxxxxxxx
Generally, you would use TCP for any kind of connection oriented
programming.
UDP is a one way ticket. The only thing i can think is pinging the server
before sending the packet. Is there a particular advantage that your
looking
for that directed you to UDP?

"stgislander" wrote:

I'm forwarding this question from a retired software developer who
truthfully
is having a difficult time reading the small text on the forum.

He is sending and receiving UDP packets over a wireless network to
control a
semi-autonomous model, and is trying to development a routine that can
detect
when the network connection (carrier) is lost and is reestablished. Much
like the balloons that pop up over the network connection icon when the
network cable is unplugged and replugged. If he can detect this, he can
notify the program operator when lost and reset his ports when it
returns.
He tells me he has tried a few methods but not seem to work well, so he
is
diving back into the Winsock implementation to see if he is missing
something.

What is the best way to detect a lost network connection?


.



Relevant Pages

  • alt.2600 FAQ Revision .014 (2/4)
    ... One type of firewall is the packet filtering firewall. ... Dropping packets instead of rejecting them greatly increases the time required to scan your network. ... Port scanning UDP ports is much slower than port scanning TCP ports. ... Chartreuse Use the electricity from your phone line Cheese Connect two phones to create a diverter Chrome Manipulate Traffic Signals by Remote Control ...
    (alt.2600)
  • Re: Lost network connection detection
    ... Our developer tells me that he ultimately decided pinging the server was his ... and we did not care if a packet was ocassionally lost or dropped. ... define "absence of network": UDP packet can be discarded before it gets sent ... He is sending and receiving UDP packets over a wireless network to ...
    (microsoft.public.win32.programmer.networks)
  • RE: Freebsd Theme Song
    ... from the network into the ethernet receiver. ... It takes a certain amount of time to get the packet out of ... At low data rates polling is less ... >Subject: Re: Freebsd Theme Song ...
    (freebsd-questions)
  • Re: [9fans] Do we have a catalog of 9P servers?
    ... network layer data units, ergo, NAT again. ... The "packet ...
    (comp.os.plan9)
  • Re: very slow convergence of ntp to correct time.
    ... Many years ago the Proteon routers dropped the first packet ... David> after the cache timed out; ... cause issues for others when they are reconfiguring part of the network. ...
    (comp.protocols.time.ntp)