Re: UDP network problem

Bruce Thompson (bruce@otherother.com)
Sun, 17 Aug 1997 08:55:51 -0700


>> During some experiments with programming UDP/IP sockets, I've noted that I
>> could transfer more than 3250 bytes of data. The sendto() routine says it
>> has sent the data, but recvfrom() just blocks. This is a consistent error.
>
>UDP is an unreliable delivery system, it makes no send/receive guarantees.
>Use TCP if you require these.
>
>Alan

There's also a maximum UDP packet size that you may be running into. Some
implementations of UDP will tell you (return an error) if you try to send a
packet that's too big. Others will silently through the offending packet
away.

It's generally best to send small packets with UDP, typically smaller than
1024 bytes. As Alan says, there's still no guarantee of delivery nor is
there any guarantee of delivery order.

Cheers,
Bruce.

--
--------------------------------------------------------------------------
Bruce Thompson                  | "So long and thanks for all the fish"
Developer Technical Support     |     -- Hitchiker's Guide to the Galaxy
Newton Inc.                     |
bruce@newton.apple.com          |
bruce@otherother.com            |
        I don't speak for Newton, Inc., my opinions are strictly my own.
	    (finger thompson.long@rahul.net for PGP key)
  PGP Fingerprint: 8F48 7FEF EE22 14FB 1F2E  3BF2 0D40 9628 53E8 72EB