[erlang-bugs] socket reuseaddr not functional on windows

hume npx humeafo@REDACTED
Sun Oct 14 05:55:49 CEST 2012


I test it under windows, according to the source code , unix should be ok.

2012/10/14 hume npx <humeafo@REDACTED>

> using reuseaddr option while do UDP socket  processing, it is not
> functional. I searched the question on google, it seems that it's caused by
> inet_drv.c line 5611, in fact win32 support reuseaddr, should the following
>
> #ifdef __WIN32__
>     continue;  /* Bjorn says */
> #else
>
> part be commented?
>
>  case INET_OPT_REUSEADDR:
> #ifdef __WIN32__
>     continue;  /* Bjorn says */
> #else
>     type = SO_REUSEADDR;
>     DEBUGF(("inet_set_opts(%ld): s=%d, SO_REUSEADDR=%d\r\n",
>     (long)desc->port, desc->s,ival));
>     break;
> #endif
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20121014/04447001/attachment.htm>


More information about the erlang-bugs mailing list