|
||||
The Berkeley Sockets API established a standard that would alleviate the dilemma of incompatible network interfaces, but the Berkeley solution didnt fit cleanly into the event-driven programming model of Windows. With blocking functions -- functions that dont 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:
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 vendors implementation to another. Well-written WinSock applications that adhere to the standard WinSock API will run on any vendors 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.
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: |
||||
Home | Example Source Code | WinSock Specifications | Development Files | Related Links |
||||