好像现在的Windows编程都说Winsock2。是不是以前还有一个Winsock1,然后现在的api里面还有很多兼容的部分?
如题,谢谢。

解决方案 »

  1.   

    WinSock1.1提供的是与Unix/Linux类操作系统保持兼容的通用的、基本的函数库 Winsock2.2引入了与Windows内核密切相关的【重叠IO】机制,提供了WSA打头的,支持【重叠IO】的异步函数库 
    Winsock2.2还将一些常用socket操作序列进行了打包封装,提供了以Ex结尾的部分函数 
      

  2.   

    Question 
    What are the main differences between winsock1.1 and winsock2? Answer 
    In winsock 1, TCP/IP was the only protocol officially supported. In Winsock2 there is support for OSI, Novell IPX/SPX and Digital's DECNet added to the spec. There is also a standard mechanism to add new protocols. Also there is now much better integration between winsock. For example you can now use readfile(). on a socket instead of recv(). There is support for Quality of service and Multicasting. QoS is the ability to reserve a portion of bandwidth on a connection. Probably most importantly, there is now support for layered service providers. This allows you to 'plugin' things like an SSL layer and automatically encrypt your data. For a complete list of what is in the Winsock2 specification point your browser to http://www.sockets.com/winsock2.htm#OverView