[SDL] SDL_net and broadcast

José Luis Sánchez wizord at mi.madritel.es
Wed Sep 18 04:03:02 PDT 2002

Gautier Portet <gautier at -remove-tlk.fr> escribió:

> Hello all,
> I'm looking for a way to detect players on a LAN, and it seems that 
> broacast is the way to go. But SDL_net do not support it.
> I want to know if support is planned ? or any hints on how to add it ?

You can try to use sockets directly, but sending packets to a broadcast address
is a privileged operation on many systems (not in Linux, thought).

If still interested, you can take a look at:
man 2 socket (for opening a socket)
man ip (for general information about raw sockets)
man setsockopt (for setting broadcast mask to the socket)

Please remember sending too much broadcast packets throught a network can
easily drop the network down.


More information about the SDL mailing list