NDK_FN_DISCONNECT_EVENT_CALLBACK_EX callback function (ndkpi.h)
The NdkDisconnectEventCallbackEx (NDK_FN_DISCONNECT_EVENT_CALLBACK_EX) function is called by the NDK provider once when the peer disconnects.
Syntax
NDK_FN_DISCONNECT_EVENT_CALLBACK_EX NdkFnDisconnectEventCallbackEx;
void NdkFnDisconnectEventCallbackEx(
[in, optional] PVOID DisconnectEventContext,
[in] ULONG ProviderDisconnectReason
)
{...}
Parameters
[in, optional] DisconnectEventContext
A context area that was specified in the DisconnectEvent parameter of the NdkCompleteConnectEx (NDK_FN_COMPLETE_CONNECT_EX) or NdkAcceptEx (NDK_FN_ACCEPT_EX) function when the completion queue (CQ) object was created.
[in] ProviderDisconnectReason
A provider specific code that indicates why the connection has disconnected.
Zero indicates the NDK provider does not support the disconnect reason capability yet or did not provide one.
Return value
None
Remarks
Note
This routine is implemented by the NDK consumer and passed to the NDK provider.
NdkDisconnectEventCallbackEx is a callback function for connection disconnect events. A disconnect notification callback function is specified for a connection with the NdkCompleteConnectEx (NDK_FN_COMPLETE_CONNECT_EX) function on the initiator side and with the NdkAcceptEx (NDK_FN_ACCEPT_EX) function on the listener side. The NDK provider invokes this callback only once when the peer disconnects. The provider should not flush outstanding work requests when it indicates a disconnect event because of an incoming disconnect request from the peer.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDKPI 2.1 and later. |
Minimum supported server | Windows Server 2022 |
Target Platform | Windows |
Header | ndkpi.h (include Ndkpi.h) |
IRQL | <=DISPATCH_LEVEL |