[erlang-questions] Question on 'reuseaddr' semantics on Windows XP

Avinash Dhumane <>
Fri Jan 24 07:11:32 CET 2014


I have following:

 

    {ok, Socket} = gen_udp:open(54321, [binary, {active, true}, {reuseaddr,
true}]),

    ok = inet:setopts(Socket, [{add_membership,{{233, 1, 2, 5}, {0, 0, 0,
0}}}]),

 

On first use, it succeeds.

 

While first socket is in use, opening another socket results in 'eaddrinuse'
error, in spite of {reuseaddr, true}.

 

I referred to past question:
http://erlang.org/pipermail/erlang-questions/2013-September/075275.html.

 

And, also the background:
http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-
so-reuseport-how-do-they-differ-do-they-mean-t

 

I gather that the error should not occur for multicast use case. But still,
since it does occur, hence is this question (repeated). 

 

Any resolution? This is on Windows XP SP3.

 

Thanks

Avinash

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140124/89491f6a/attachment.html>


More information about the erlang-questions mailing list