[SDL] SDL_Net

Gaëtan de Menten ged at bugfactory.org
Mon Jul 22 18:51:00 PDT 2002


>hi, im trying to write a game that uses SDL_Net and i was wondering if its
possible that packets i send could get broken up so the server would recieve
lets say a >UINT16 in 2 packets, each made up of a UINT8.
Depends if you use TCP or UDP... UDP is a packet oriented unreliable
protocol, so your packets might arrive in disorder or not arrive at all.
While TCP is a reliable stream protocol, that means the *bytes* will arrive
and will arrive in the correct order but a bunch of bytes sent could arrive
in several bunchs, or, several small chunks might end up being received as
one large bunch of bytes... It s very easy to write functions for TCP to
work with packets though...

I proposed to add those simple functions in SDL_net a while ago but well,
seems like it went unnoticed... :-(

Hope this helps,
Gaëtan.





More information about the SDL mailing list