lua-users home
lua-l archive

Re: luasocket udp multicast working example?

[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: [Re: luasocket udp multicast working example?, Sam Roberts

AltStyle によって変換されたページ (->オリジナル) /