fixed SO_REUSEADDR WIN32 strangeness
This commit is contained in:
+11
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user