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', '', 50005)

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

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

An update to would be nice...

Best regards

Den 2012-02-06 12:33, skrev Valerio Schiavoni:
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.