You're trying to add a Windows misfeature to Linux. Linux doesn't have this misfeature on purpose.
I call it a misfeature because when Windows does this, it kills off all connections using that network interface even if no packets were ever lost. Also, unless you're in the simplest possible case, with just two machines and a crossover cable (or MDI-X) it can't detect failures in intermediary or remote parts of the physical layer connection.
Think about that: Windows is only dropping connections when it detects a local failure which may well be temporary, but doesn't even try to detect failures further down the line.
Windows may hope that these intermediaries and its remote peers will copy its misfeature, but they don't because they are designed with the same principles as the protocols of the Internet itself, which was designed with failure in mind. The whole Internet doesn't blow up when a core router has a little blip. It copes.
If you wonder what my standing is in holding this strong opinion, it's that I've been writing networked programs for about two decades now. That experience pounds Murphy's Law into you: anything that can go wrong will. Tossing up your hands at every little failure just makes your programs brittle. Coping is better.
Ever notice that your web browser doesn't close all its tabs when the network link goes down? That's because it copes with network failures. Some of this is is due to the design of HTTP, but some is also a choice by the designers of the web browser in handling detectable failures. By contrast, Windows Explorer shoots all open Explorer windows back to the default folder (
My Computer, usually), so when you come back to the machine after a blip, you've lost your working place.
If you absolutely had to do this, the tools suggested in robbat2's answer will do this. Far better, however, to write your network programs to cope with network link failure.
When failure is not an option, set up redundant network interfaces using the NIC channel bonding feature of the Linux kernel. You can configure a system to automatically fail over to a second (or third!) network interface if one link fails.