[SDL] UDP packet managing vis sdlnet

Mattias Engdegård f91-men at nada.kth.se
Tue Aug 14 09:30:01 PDT 2001

>I only briefly looked at the code, but I highly doubt you can send UDP and
>TCP packets with the same socket or on the same port, at the same time or
>while TCP is connected.

UDP and TCP have separate port spaces so this is not a problem

>All in the name of effecieny.. thats why UDP is
>generally used where packet loss is expected, such as streaming

It is correct that UDP packets may be lost or reordered/duplicated but
not that they are necessarily more efficient (on some data links TCP
has both higher bandwidth and lower latency). However since you must
implement your own flow control with UDP you can tailor it better to
your needs (and make it more tolerant to dropped packets etc)

>> Currently, the
>> server side waits for clients to connect and then periodically broadcasts
>> TCP and UDP packets to all of the connect clients.

you can't broadcast TCP packets but I assume you didn't use it in a
technical sense.

There can very well be nasty dragons hiding inside SDL_net -- I haven't
ventured into it very far myself. I would prefer to debug it using
dynamite :-)

More information about the SDL mailing list