// wsk.h
typedef struct _WSK_SOCKET {
const VOID *Dispatch;
} WSK_SOCKET, *PWSK_SOCKET;
View the official Windows Driver Kit DDI referenceNo description available.
The WSK_SOCKET structure defines a socket object for a socket.
DispatchA pointer to a constant provider dispatch structure. This structure is a dispatch table that contains pointers to a socket's functions. Depending on the WSK socket category of the socket, this pointer is a pointer to one of the following structures:
| Socket category | Dispatch table structure |
|---|---|
| Basic socket | WSK_PROVIDER_BASIC_DISPATCH |
| Listening socket | WSK_PROVIDER_LISTEN_DISPATCH |
| Datagram socket | WSK_PROVIDER_DATAGRAM_DISPATCH |
| Connection-oriented socket | WSK_PROVIDER_CONNECTION_DISPATCH |
| Stream socket | WSK_PROVIDER_STREAM_DISPATCH |
The WSK subsystem allocates and fills in a WSK_SOCKET structure whenever a new socket is created. A WSK application receives a pointer to the WSK_SOCKET structure for a socket from the WSK subsystem in one of the following ways:
A WSK application passes the pointer to a socket's WSK_SOCKET structure when calling any of the socket's functions.
The WSK subsystem frees the memory for the WSK_SOCKET structure when the WSK application calls the WskCloseSocket function to close the socket.
WSK_PROVIDER_CONNECTION_DISPATCH
WSK_PROVIDER_DATAGRAM_DISPATCH