Re: UDP socket
- From: "Nils O. Selåsdal" <NOS@xxxxxxx>
- Date: Fri, 06 Oct 2006 08:19:03 +0200
Gaurav wrote:
Actually i have an UDP receiver application which does lots ofWehter you use blocking or non-blocking sendto bears no
processing so the receiving application is slow in speed as compared to
sender.
I just want to know, what would happen if both these application run
for some time.
i am using non blocking call for sendto().
impact on this.
ethernet flow control is ON by default.
I dont want any packet loss.
Then you have selected the wrong protocol.
UDP is unreliable, queues can be full on many layers, packets can be altered in transmissions, and contain errors - leading
to packet getting discarded without notice and UDP does not
have facilities for retransmission, flow control, etc.
Things that can go wrong includes
- ethernet receiving buffer is full, packet is discarded
- unreliable connection leading to bit errors - packet is discarded
- receiving socket buffer is full, packet is discarded
- a router inbetween discards the packet for whatever reason.
Some of these might lead to the node sending an ICMP source quench
message, telling the sender to send at a slower rate - but that's no
guarantee that you don't lose packets with UDP.
If you want reliable transmission with UDP you have to implement that
yourself - you should rather use an existing protocol which does
guarantee delivery, in sequence.
.
- References:
- UDP socket
- From: Gaurav
- Re: UDP socket
- From: David Schwartz
- Re: UDP socket
- From: Gaurav
- UDP socket
- Prev by Date: Re: Named pipe discarding old data
- Next by Date: help in Port delegation in socket programs
- Previous by thread: Re: UDP socket
- Next by thread: Re: UDP socket
- Index(es):
Relevant Pages
|