Added WSInit class to initialize WinSock2.
Changed to use 'auto'.