I would like to see how a program responds when it's connection is severed. Aside from disabling the network card, is there a way to sever a tcp connection in Windows without killing the process, or the thread that owns the connections?
One thing I've seen done is to have the network code written in such a way that a connection can be severed remotely. A product I once worked on was written that way. We even had a set of torture tests that would randomly break the connections. The product was meant to be transactional, and it was instructive to see how it behaved.
Of course, we then found a customer whose network was actually breaking connections all the time, and were very glad we'd tested so hard.
TCPView by SysInternals lets you close a connection (and see all open connections).
Why not use a firewall? you can either block specific ports or processes. The built-in Windows firewall has an API, so you can create a tool that will connect and disconnect your app in whatever way you want.