[SDL] SDL_net and broadcast

Gautier Portet gautier at -remove-tlk.fr
Wed Sep 18 02:51:01 PDT 2002

Francesco Orsenigo <xarvh at lombardiacom.it> escribió:

> José Luis Sánchez:
> > Socketpair returns both socket descriptors, and is commonly followed by a
> > fork().  It serves as a commodity replacement for all the above (i.e. open
> > listen socket, open client socket, etc.) when the connection will take
> > place on a single machine,
> Exactly what i do.
> I use it for the "Create Game" feature of my game.
> It is quite useful if you don't want the host user to start both client and 
> dedicated server....
> Why SDL_net has not such feature?
> Should be useful to lots of game programmers...

Well, I don't use SDL_net and I'm not sure why that call isn't implemented, but
I can figure out it's due to portability issues.  socketpair is only supported
on Unix environments; it's unsupported even on Windows (except CygWin).

OTOH, you can make use of shared memory if concerned about speed.


More information about the SDL mailing list