Windows Sockets

Last Edited



Definition of Windows Sockets in Network Encyclopedia.

What is Windows Sockets?

Windows Sockets, also called Winsock, is an interprocess communication (IPC) mechanism that provides reliable, connection-oriented two-way communication or unreliable connectionless communication between processes on two computers. Windows Sockets is a Microsoft Windows implementation of the well-known Berkeley Sockets application programming interface (API) for accessing datagram and session services over TCP/IP. It provides guaranteed delivery of data between computers for distributed applications.

Windows Sockets Model (compared with OSI Model)
Windows Sockets Model

Windows Sockets can be used by TCP/IP, NWLink, and AppleTalk network protocols. Windows Sockets applications on Windows operating systems include File Transfer Protocol (FTP), Telnet, and Microsoft Internet Explorer. Windows Sockets is implemented as a dynamic-link library (DLL) for Windows operating systems. The current implementation of Windows Sockets on Windows platforms is version 2, which supports multicasting, provides better performance than previous versions, and supports wireless communication.

Windows Sockets 2

Windows Sockets 2 (Winsock) enables programmers to create advanced Internet, intranet, and other network-capable applications to transmit application data across the wire, independent of the network protocol being used. With Winsock, programmers are provided access to advanced Microsoft® Windows® networking capabilities such as multicast and Quality of Service (QoS).

Winsock follows the Windows Open System Architecture (WOSA) model; it defines a standard service provider interface (SPI) between the application programming interface (API), with its exported functions and the protocol stacks. It uses the sockets paradigm that was first popularized by Berkeley Software Distribution (BSD) UNIX. It was later adapted for Windows in Windows Sockets 1.1, with which Windows Sockets 2 applications are backward compatible. Winsock programming previously centered around TCP/IP. Some programming practices that worked with TCP/IP do not work with every protocol. As a result, the Windows Sockets 2 API adds functions where necessary to handle several protocols.

Windows Sockets 2 Architecture
Windows Sockets 2 Architecture

Developer audience

Windows Sockets 2 is designed for use by C/C++ programmers. Familiarity with Windows networking is required.

Run-time requirements

Windows Sockets 2 can be used on all Windows platforms.

For a complete guide about Windows Sockets 2 click here.