How the library detects connection loss


When a network connection is unexpectedly interrupted (for example, when an Ethernet cable is unplugged or a modem is disconnected), the operating system may take several minutes to detect the loss. During this time, Winsock is unaware that the connection has been broken, and as a result, the component also remains unaware of the disconnect.

If data is sent over the affected connection, Winsock will then detect the failure, at which point an exception will be raised by the component.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.