I've written my own C# TCP communications module (using SocketAsyncEventArgs, although that's presumably irrelevant). My module runs at both ends of the connection, client and server. As part of the programming it is supposed to detect when the connection fails, and then automatically try to reestablish the connection. I'd like to hear idea about how to test this. One solution is to run it on two physical machines and unplug the network cable for a while and then reconnect. This isn't very automated. I'm wondering if there is some kind of WinSock hook program that can be used to simulate connection failures? Or any other suggestions?
How to test Windows .NET TCP program handling of connection failure
.net;testing;windows;tcp