PFN_WSK_LISTEN - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wsk.h

PFN_WSK_LISTEN PfnWskListen;

NTSTATUS PfnWskListen(
  [in]      PWSK_SOCKET Socket,
  [in, out] PIRP Irp
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wsk-pfn_wsk_listen)

PFN_WSK_LISTEN callback function

Description

The WskListen function enables a stream socket to listen for incoming connections at the socket's bound address.

Parameters

Socket [in]

A pointer to a WSK_SOCKET structure that specifies the socket object for the stream socket that is listening for an incoming connection. This socket must have previously been bound to a local transport address by calling WskBind.

Irp [in, out]

A pointer to a caller-allocated IRP that the WSK subsystem uses to complete the listen operation asynchronously. For more information about using IRPs with WSK functions, see Using IRPs with Winsock Kernel Functions.

Return value

WskListen returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS The stream socket listened for an incoming connection successfully. The IRP will be completed with success status.
STATUS_PENDING The IRP has been queued by the WSK subsystem, which is waiting for an incoming connection on the stream socket.
STATUS_FILE_FORCED_CLOSED The socket is no longer functional. The IRP will be completed with failure status. The WSK application must call the WskCloseSocket function to close the socket as soon as possible.
Other status codes An error occurred. The IRP will be completed with failure status.

Remarks

A WSK application can call the WskListen function only on a stream socket that the application previously bound to a local transport address by calling the WskBind function. Once WskListen is successfully called on a stream socket, the socket is committed to a listening socket flow and can no longer call connection-oriented socket functions.

See also

WSK_PROVIDER_STREAM_DISPATCH

WSK_SOCKET

WskAccept

WskBind

WskCloseSocket