Re: Determining if it is "safe" to send UDP packets

From: Scott McPhillips [MVP] (org-dot-mvps-at-scottmcp)
Date: 01/30/05


Date: Sun, 30 Jan 2005 09:29:30 -0500

Spiro Trikaliotis wrote:
>>I could be glib and say the answer is TCP but I assume you have good
>>reasons for using UDP.
>
>
> Yes, we have. We want to transfer images obtained from a camera as fast
> as possible over a wireless link. The protocol used is tolerant of
> packet losses, thus, it is not a big problem if the one or the other
> packet does not get received.
>
> Every image is packed. Unfortunately, the packed images appear almost
> all at the same time. That's the reason why we have to send them out in
> bursts.

I don't know if it will help in your UDP case, but if you have not
experimented with various buffer sizes using SO_SNDBUF it might be worth
an investigation.

But the burst nature of the data source just about guarantees that you
will create buffer overflows if you send as fast as possible. I think
you are going to have to limit the data rate yourself by introducing
delays between packets. That delay could be based on experimentation
or, as suggested, an automated training sequence.

-- 
Scott McPhillips [VC++ MVP]


Relevant Pages

  • Re: Determining if it is "safe" to send UDP packets
    ... I am currently developing an application that uses UDP for broadcasting ... the next packet hits the wire. ... We want to transfer images obtained from a camera as fast ... > next 100%-x% are not send, they are almost all completely lost. ...
    (microsoft.public.win32.programmer.kernel)
  • 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: 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: Linux equivalent for ioctlsocket(FIONREAD) on datagram sockets
    ... blocking and non-blocking UDP sends are essentially the same. ... UDP is defined us unreliable. ... achieves packet error rate of ~1E-7 but hits the wall when we try to ... shouldn't want:(to receive UDP datagrams at low error rate. ...
    (comp.os.linux.development.apps)
  • Re: recvfrom() strange operation
    ... no matter what your network looks ... discover packet loss, partially loss and joinde packet and octett ... And the most important sfrtp working fine over TCP or UDP ... "frames" (or whatever you are calling your higher layer protocol ...
    (comp.os.linux.development.system)