Tests pass on windows!

Replaced lower level sockets with higher level API by using a simple alarm
around the connect.