Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I am sending packet from DSLAM to modem.Packets are UDP.If in case transmission gets over suddenly we should know weather it is because of modem being off or wire cut.It is a problem we face in IPTV.
Posted

There's no earthly way you can determine why the connection dropped. You can only determine that it did in fact drop.
 
Share this answer
 
UDP does not have a built-in connectivity status, when switching to TCP is not feasible then here are two other alternatives:

1) You might want to add a connectivity test to your application. For example test in regular interval if a service (on the internet) is still available.

2) If you do not have a kind of connectivity status to use, then add one by implementing a reasonable fast heartbeat in your own application. If peer A wants to know about the status/availability of peer B, it either has to receive a "message" from B in regular intervals (and therfor knows that peer B is alive) -or- when there is no regular traffic to piggyback the heartbeat then one of the peers has to initiate (additional) heartbeats in reasonable intervals. For example an IRC server uses regular ping/pong messages every few minutes to find out about the connection status of its chat clients.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900