[SDL] UDP packet managing vis sdlnet

david ackley jones davej at midway.uchicago.edu
Wed Aug 15 08:30:01 PDT 2001


Don't I lose portability when I use berkeley sockets?  That's pretty much
the reason why I use SDLNet.

-dave


On Wed, 15 Aug 2001, Oisin Mulvihill wrote:

> Hi,
> 
> why don't you just use stream sockets? Its simple
> and straight forward to use. You could get your
> project working and then go back to UDP later if
> you really need it. 
> 
> om
> 
> -----Original Message-----
> From: david ackley jones [mailto:davej at midway.uchicago.edu]
> Sent: Tuesday, August 14, 2001 11:50 PM
> To: sdl at libsdl.org
> Subject: Re: [SDL] UDP packet managing vis sdlnet
> 
> 
> I actually understand some of the theory behind UDP, but I'm kinda stuck
> on the implementation side of it.  Actually, I can't say that I really
> understand what 'channels' are in the SDLNet library.  I would've guessed
> you'd just stuff em in a socket and not worry about it anymore.  The
> channel part has me baffled.
> 
> Not broadcast, but the server sends out a beacon to its clients via TCP.  
> 
> Maybe if I explained what the end project is:  I'm modifying someone's
> code that reads in keyboard events from a windows box and sends them via
> TCP to its connected clients which are running Linux.  The linux clients
> read the incoming data, parse them, and has X run them.  You'd up having
> keyboard control of a bunch linux boxes with a windows machine.
> 
> I'm currently adding the mouse support.  Mouse movement doesn't have a
> high priority and there's a lot of it.  Therefore, UDP packets make sense
> for sending out that data.  Before I go there, I wanted to get comfortable
> with SDLnet's library.  Which brings me to my current situation.
> 
> Any more comments are welcome.  thx
> 
> 
> 
> On Tue, 14 Aug 2001, =?ISO-8859-1?Q?Mattias Engdeg=E5rd?= wrote:
> 
> > >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
> > >applications.
> > 
> > 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 :-)
> > 
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> > 
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 





More information about the SDL mailing list