Add support for Windows

Add support for Windows with withSocketsDo. Without this running the client on Windows results in *** Exception: getAddrInfo: does not exist (error 10093)