Automatically-reconnecting TCP tunnel Is the old an unmaintained Reliable Sockets (Rocks) what you're looking for ?