Modularized the initializing and the terminating process of the Winsock. 

and added the Winsock initialization/termination failure processes.