The information in this article applies to:
SYMPTOMSTo close a Winsock server and rebind a new server to its old port you need to employ setsockopt() on the server socket with SO_REUSEADDR. However, this becomes problematic if the server spawned incoming clients into child processes for handling. If any child processes are left open with their socket connection intact, any future client connection requests to any new server will be forcefully refused (WSAECONNREFUSED). CAUSE
When the server calls closesocket(), the Windows NT TCP/IP address object
connect handler address is set to NULL, which causes TCP/IP to send a
TCP/IP Reset (RST) when future clients attempt to connect to the server's
port number.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor additional information, please see the following article in the Microsoft Knowledge Base: Q166846 Cannot Reconnect to TN3270 Server with Close Listen Sockets Additional query words: SO_REUSEADDR
Keywords : kbnetwork kbIP kbNTOS400 kbSDKPlatform kbWinOS95 kbWinsock kbGrpNet |
Last Reviewed: October 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |