fixed SO_REUSEADDR WIN32 strangeness

This commit is contained in:
Jeff Hill
2000-11-08 03:57:03 +00:00
parent 4784b73a9f
commit 67c207d352
3 changed files with 25 additions and 10 deletions
+11 -1
View File
@@ -47,6 +47,9 @@
* .09 050494 pg HPUX port changes.
* .10 021694 joh ANSI C
* $Log$
* Revision 1.39 2000/10/11 22:23:30 jhill
* configure that WINSOCK is very different about SO_REUSEADDR
*
* Revision 1.38 2000/08/25 19:44:30 jhill
* fixed Linux uses unsigned where int is used on other OS
*
@@ -243,7 +246,14 @@ int main()
return IOCLS_ERROR;
}
# ifndef SO_REUSEADDR_DOES_NOT_RELEASE_TCP_PORT
/*
* Note: WINSOCK appears to assign a different functionality for
* SO_REUSEADDR compared to other OS. With WINSOCK SO_REUSEADDR indicates
* that simultaneously servers can bind to the same TCP port on the same host!
* Also, servers are always enabled to reuse a port immediately after
* they exit ( even if SO_REUSEADDR isnt set ).
*/
# ifndef SO_REUSEADDR_ALLOWS_SIMULTANEOUS_TCP_SERVERS_TO_USE_SAME_PORT
optval = TRUE;
status = setsockopt( pserver->sock,
SOL_SOCKET,