lua-users home
lua-l archive

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


To send to multicast just use sendto()

socket.udp():sendto('hello world', '239.192.1.1', 50005)

To receive, I found by reading the C -code:

s1 = socket.udp()
res, err = s1:setsockname('239.192.1.1', 50005)
res, err = s1:setoption("ip-add-membership" , { multiaddr = '239.192.1.1', interface = '10.0.0.10'})

An update to http://w3.impa.br/~diego/software/luasocket/udp.html would be nice...


Best regards
Egil




Den 2012-02-06 12:33, skrev Valerio Schiavoni:
Hello,
can anyone show us a working example of usage for LuaSocket and its support for UDP multicast?
I've been googling quite extensively without any luck.

Thanks,
Valerio