Added socket wrapper for windows support.