sockaddr.com
WinSock Version Differences


The Berkeley Sockets API established a standard that would alleviate the dilemma of incompatible network interfaces, but the Berkeley solution didn’t fit cleanly into the event-driven programming model of Windows. With blocking functions -- functions that don’t return immediately -- a Windows program often appeared to stall. The WinSock group set out to emulate the Berkeley API, but they knew that they had to add extensions to this standard to make it fit the Windows programming model.

Version 1.0

Windows Sockets version 1.0 was the initial release made by the WinSock group. At that time, there were no commercially available WinSock implementations. This version was used mainly by network software suppliers to start the process of building and testing what would become their first WinSock releases. During this period of development, several changes were made to the specification to meet the requirements of various vendors and to further qualify the specification

Version 1.1

The first official release, WinSock 1.1, soon became the industry standard and is still widely in use today. Version 1.1 follows the guidelines laid out in version 1.0 but incorporates several changes that resulted from the experiences of early WinSock implementers. The following key features in WinSock 1.1 made it attractive to developers:

  • Standardized API. It supported one well-defined interface to the TCP/IP suite of protocols, rather than different interfaces for each protocol stack vendor.

  • Binary compatibility. The dynamic link library (DLL) design provides binary compatible services from various vendors.

  • Consistent network byte-order conversion. WinSock implementations are required to provide the standard set of byte-order conversion routines that are unique to each type of CPU.

  • WSA extensions. New functions, data types, and structures allow network applications to fit cleanly into the Windows programming model.

The WinSock 1.1 specification focuses exclusively on the TCP/IP suite of network protocols. Some vendors (most notably Microsoft) added other protocols, but they are not part of the official WinSock specification. WinSock 1.1 vendors do not have to support these additional protocols in order to be WinSock compliant.

WinSock's DLL design even makes it unnecessary for applications to be recompiled when being moved from one vendor’s implementation to another. Well-written WinSock applications that adhere to the standard WinSock API will run on any vendor’s WinSock.

There are 16-bit and 32-bit versions of WinSock 1.1. It ships with Windows 95 and versions of Windows NT prior to version 4.

Version 2.0

Windows Sockets version 2 greatly expands the original standard. Most importantly, it officially supports protocols other than TCP/IP and provides mechanisms that allow applications to be protocol independent.

With only a couple of exceptions, WinSock 2 encapsulates the entire version 1.1 API at the source level. At the binary level, WinSock 2 is 100% compatible with version 1.1. Applications compiled and linked with version 1.1 will run on version 2 unchanged. In addition to this strict backward compatibility with version 1.1, WinSock 2 provides significant new functionality.

  • Multiprotocol support. WinSock 2 allows an application to use the familiar socket interface to achieve simultaneous access to any number of installed transport protocols. WinSock is no longer restricted to use on TCP/IP only.

  • Asynchronous I/O, and event objects. WinSock 2 uses the overlapped I/O model introduced in Win32 environments. Asynchronous I/O enables an application to continue with other processing while waiting for an I/O operation to complete. Event objects can be used to determine when operations conclude even if the application does not have a graphical window.

  • Quality of service. In order to support emerging network technologies such as real-time multimedia communications, WinSock 2 establishes conventions for applications to negotiate required service levels of communication service for parameters such as bandwidth and latency.

WinSock 2 uses the design proposed by the Windows Open Services Architecture (WOSA) guidelines. WOSA defines a common set of interfaces for connecting front-end applications with back-end services. This format provides both an Application Program Interface (API) and a Service Provider Interface (SPI). The API defines the functions and data structures that give applications programmers access to services. The SPI defines the hooks that allow protocol stack vendors to make their network services available.

The WinSock 2 DLL (WS2_32.DLL) is not supplied by each protocol stack vendor, as WINSOCK.DLL and WSOCK32.DLL were. Instead, each stack vendor supplies a service provider library that can be hooked into the WinSock 2 DLL. Any number of service provider libraries can be dynamically linked to WinSock at run-time, allowing a WinSock 2 application to access services from one or more transport protocols simultaneously. This is an improvement over the WinSock 1.1 design, which is implemented as a single DLL provided by a specific protocol stack vendor and thus prohibits simultaneous use of multiple protocol stacks.

More About WinSock:
What's A WinSock? | The Sockets Paradigm | The Files You Need


Home | Example Source Code | WinSock Specifications | Development Files | Related Links