lua-users home
lua-l archive

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


Adrian Sietsma wrote:
> What I can't do is then join that group:port from a second app; despite the
> SO_REUSEADDR, the first bind(INET_ADDR_ANY , 1700) fails : not with an "in
> use" error message, but a "permission denied".

You need a specific order of actions for Windows:
1. Create UDP socket
2. Set SO_REUSEADDR option
3. Bind addr = INADDR_ANY, port = multicast-port
4. IP_ADD_MEMBERSHIP multiaddr = multicast-group

See:
  http://msdn.microsoft.com/en-us/library/ms740621(VS.85).aspx
  http://support.microsoft.com/default.aspx?scid=kb;en-us;131978

--Mike