[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: UDP Broadcast
- From: Sean Conner <sean@...>
- Date: Sat, 14 Nov 2009 14:32:47 -0500
It was thus said that the Great Clark Snowdall once stated:
> Thanks for the suggestions ... some of them were helpful.
> I've done some more exploration, and I think the issue is I can't send
> a UDP broadcast packet. I can see non-broadcast packets, but when I
> select the ip address for broadcast, it doesn't show up. Could it be
> something with my router? Or lua UDP doesn't really like broadcast?
> Any suggestions?
If you want to send a broadcast packet, you need to set an option on the
socket to do so. In C (under Unix) this would be:
rc = setsockopt(sock,SOL_SOCKET,SO_BROADCAST,&dummy,sizeof(dummy));
if (rc < 0)
You'll need to find the equivilent under the Lua library you are using.