[SDL] SDL_net and broadcasting

Sam Lantinga slouken at devolution.com
Sun Sep 29 17:39:01 PDT 2002


> On Friday, September 27, 2002, at 02:04 PM, Luc-Olivier de Charrière 
> wrote:

> > Hello.
> >
> > **My motivations
> > I'm currently working on a great GPL game, "globulation2", aviable on 
> > savanah.
> > Thatfor, I need broadcasting ability in the LAN or subnet. (sening to 
> > ip 255.255.255.255)
> > But SDL_net does not provide the abitity to send packet to ip 
> > 255.255.255.255.

> IIRC, anything ending in .255 is a broadcast address. If your subnet is 
> 128.0.0, sending to 128.0.0.255 should broadcast to the entire network 
> - assuming the network allows IP broadcast.

> However, I don't know if this will work with SDL_net. You may have to 
> use a UDP packet instead of TCP.

SDL_net provides UDP packets, and yes, I believe Darrell is correct.
Does Linux require extra work to send to the broadcast addresses?

See ya,
	-Sam Lantinga, Software Engineer, Blizzard Entertainment




More information about the SDL mailing list