Re: UDP socket



Gaurav wrote:
Actually i have an UDP receiver application which does lots of
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().
Wehter you use blocking or non-blocking sendto bears no
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.
.



Relevant Pages

  • Re: Determining if it is "safe" to send UDP packets
    ... for receiving Udp data. ... I'm receiving from a camera lines of data at 55 Hz. ... the next packet hits the wire. ... Another problem with TCP is its assumption that a lost packet is due to ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Problem with unix sockets: SOCK_DGRAM ignores MSG_TRUNC
    ... full packet length? ... So it would behave as UDP does. ... What I question is the return value when receiving from a local socket ... I'd like to see local sockets to do the same. ...
    (Linux-Kernel)
  • Re: Actius MM10 modem
    ... telling me that "pppd exited with return value ... call retry delay timer expires) without waiting for an outbound packet. ... Shut down the link when idle-time seconds pass without receiving or ... The environment variable PPPHOME, if present, specifies the directory in ...
    (comp.os.linux.portable)
  • Re: Incoherent E-mails
    ... The Novell crap was originally run on IPX ... The term in the early-mid nineties was "packet storm". ... The original advantage of UDP was ... > 60 bytes for TCP. ...
    (alt.computer.security)
  • Re: OutOfMemoryException from Thread.Start
    ... I guess that what I'm saying is that you're implementing a resend protocol ... > of the fact that the receiving end uses a fixed 2KB buffer to receive ... >>> stream of bytes (packet) first and then sends it by calling the Socket ... >>> the client connects, the server accepts it and waits. ...
    (microsoft.public.windowsce.app.development)