Bewerken

Delen via


NDK_FN_COMPLETE_CONNECT_EX callback function (ndkpi.h)

The NdkCompleteConnectEx (NDK_FN_COMPLETE_CONNECT_EX) function completes an asynchronous connection request.

Syntax

NDK_FN_COMPLETE_CONNECT_EX NdkFnCompleteConnectEx;

NTSTATUS NdkFnCompleteConnectEx(
  [in]           NDK_CONNECTOR *pNdkConnector,
  [in, optional] NDK_FN_DISCONNECT_EVENT_CALLBACK_EX DisconnectEvent,
  [in, optional] PVOID DisconnectEventContext,
  [in]           NDK_FN_REQUEST_COMPLETION RequestCompletion,
  [in, optional] PVOID RequestContext
)
{...}

Parameters

[in] pNdkConnector

A pointer to an NDK connector object (NDK_CONNECTOR).

[in, optional] DisconnectEvent

An entry point for an optional disconnect notification callback function NdkDisconnectEventCallbackEx function NDK_FN_DISCONNECT_EVENT_CALLBACK_EX. The provider calls this callback function when the peer disconnects.

[in, optional] DisconnectEventContext

A context value to pass back to the NdkDisconnectEventCallback function that is specified in the DisconnectEvent parameter.

[in] RequestCompletion

A pointer to a request completion callback NdkRequestCompletion function (NDK_FN_REQUEST_COMPLETION).

[in, optional] RequestContext

A context value that the provider passes back to the NdkRequestCompletion function. This value is specified in the RequestCompletion parameter.

Return value

The NDK_FN_COMPLETE_CONNECT function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS The request was completed successfully.
STATUS_PENDING The request is pending. The provider will call the NdkRequestCompletion function that is specified in the RequestCompletion parameter to complete the request asynchronously.
STATUS_CONNECTION_INVALID The request failed because the queue pair is not connecting. Important: The request can fail inline as well as asynchronously with this status code.
STATUS_CONNECTION_ABORTED The accepting peer abandoned the pending connection establishment.
STATUS_IO_TIMEOUT The request failed because the connection establishment timed out. This is not an indication of a catastrophic or permanent failure, but it ends connection establishment for this connector. Important: The request can fail inline as well as asynchronously with this status code.
Other status codes An error occurred.

Remarks

The NdkCompleteConnectEx function completes a connection request that was initiated by a previous call to the NdkConnect (NDK_FN_CONNECT) function. The NDK consumer calls NdkCompleteConnectEx after the peer accepts the connection request.

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

See also

NDK_FN_ACCEPT_EX

NDK_FN_DISCONNECT_EVENT_CALLBACK_EX

NDKPI Object Lifetime Requirements

NDK_CONNECTOR

NDK_CONNECTOR_DISPATCH

NDK_FN_CONNECT

NDK_FN_REQUEST_COMPLETION