Bewerken

Delen via


PFN_WSK_SEND_BACKLOG_EVENT callback function (wsk.h)

The WskSendBacklogEvent event callback function notifies a WSK application when the ideal send backlog size changes for a connection-oriented socket.

Syntax

PFN_WSK_SEND_BACKLOG_EVENT PfnWskSendBacklogEvent;

NTSTATUS PfnWskSendBacklogEvent(
  [in, optional] PVOID SocketContext,
  [in]           SIZE_T IdealBacklogSize
)
{...}

Parameters

[in, optional] SocketContext

A pointer to the socket context for the connection-oriented socket that is notifying the WSK application about a change to its ideal send backlog size. The WSK application provided this pointer to the WSK subsystem in one of the following ways:

  • It called the WskSocket function to create the socket.
  • It called the WskSocketConnect function to create the socket.
  • It called the WskAccept function to accept the socket as an incoming connection.
  • Its WskAcceptEvent event callback function was called to accept the socket as an incoming connection.

[in] IdealBacklogSize

A variable that contains the new ideal send backlog size.

Return value

A WSK application's WskSendBacklogEvent event callback function must always return STATUS_SUCCESS.

Remarks

The WSK subsystem calls a WSK application's WskSendBacklogEvent event callback function when the ideal send backlog size changes for a connection-oriented socket only if the event callback function was previously enabled with the SO_WSK_EVENT_CALLBACK socket option. For more information about enabling a socket's event callback functions, see Enabling and Disabling Event Callback Functions.

The ideal send backlog size for a connection-oriented socket is the optimal amount of send data that needs to be kept outstanding (that is, passed to the WSK subsystem but not yet completed) to keep the socket's data stream full at all times. A WSK application can use this size to incrementally probe and lock the buffers of data to be sent based on the underlying connection's flow control state.

A WSK application can obtain the current ideal backlog size for a connection-oriented socket at any time by calling the WskControlSocket function.

The WSK subsystem calls a WSK application's WskSendBacklogEvent event callback function at IRQL <= DISPATCH_LEVEL.

A WSK application's WskSendBacklogEvent event callback function must not wait for completion of other WSK requests in the context of WSK completion or event callback functions. The callback can initiate other WSK requests (assuming that it doesn't spend too much time at DISPATCH_LEVEL), but it must not wait for their completion even when the callback is called at IRQL = PASSIVE_LEVEL.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Windows
Header wsk.h (include Wsk.h)
IRQL <= DISPATCH_LEVEL

See also

WSK_CLIENT_CONNECTION_DISPATCH

WskAccept

WskAcceptEvent

WskControlSocket

WskSend

WskSocket

WskSocketConnect