Table of contents
TOC
Collapse the table of content
Expand the table of content

Winsock Kernel Socket Categories

Last Updated: 1/24/2017

The Winsock Kernel (WSK) Network Programming Interface (NPI) defines four different categories of sockets: basic sockets, listening sockets, datagram sockets, and connection-oriented sockets. Each WSK socket category has unique functionality and supports a different set of socket functions. A WSK application must specify which category of WSK socket it is creating whenever it creates a new socket. The purpose for each WSK socket category is as follows:

Basic Sockets
Basic sockets are used only to get and set transport stack socket options or to perform socket I/O control operations. Basic sockets cannot be bound to a local transport address and do not support sending or receiving network data.

Listening Sockets
Listening sockets are used to listen for incoming connections from remote transport addresses. The functionality of a listening socket includes all of the functionality of a basic socket.

Datagram Sockets
Datagram sockets are used to send and receive datagrams. The functionality of a datagram socket includes all of the functionality of a basic socket.

Connection-Oriented Sockets
Connection-oriented sockets are used to send and receive network data over established connections. The functionality of a connection-oriented socket includes all of the functionality of a basic socket.

© 2017 Microsoft