lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

It was thus said that the Great Clark Snowdall once stated:
> Everyone,
> 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.