ClientEventReceiveExpedited

TDI_STATUS
ClientEventReceiveExpedited (
IN PVOID TdiEventContext,
IN CONNECTION_CONTEXT ConnectionContext,
IN ULONG ReceiveFlags,
IN ULONG BytesIndicated,
IN ULONG BytesAvailable,
OUT ULONG *BytesTaken,
IN PVOID Tsdu,
OUT PIRP *IoRequestPacket
);

ClientEventReceiveExpedited is a routine the TDI driver calls in response to a TDI_EVENT_RECEIVE_EXPEDITED event. It copies connection-oriented expedited data that the driver provides from the network. It is almost identical to ClientEventReceive, with differences as noted below.

Expedited data flow supersedes normal data flow. The TDI driver can call ClientEventReceiveExpedited on a connection even though a normal receive operation or an indication to ClientEventReceive is in progress. Normal data flow does not resume until the client has received the expedited data and ClientEventReceiveExpedited has returned. If the client issues a receive request for additional expedited data after ClientEventReceiveExpedited has finished, this request also has priority over a normal request for nonexpedited data.

Parameters

TdiEventContext

Points to the context the client specifies in an IRP when it issues the TDI_SET_EVENT_HANDLER request message to register ClientEventReceiveExpedited.

ConnectionContext

Specifies the context the client associates with the connection endpoint identifier.

ReceiveFlags

Specifies bit flags that provide additional information about the TSDU. TDI_RECEIVE_PARTIAL is currently the only available bit flag (see ClientEventReceive).

BytesIndicated

Specifies the number of bytes of expedited data. This value is always less than or equal to the value of BytesAvailable.

BytesAvailable

Specifies the total number of bytes currently available to the driver. The driver must provide a minimum of 128 bytes of data in its indication to the client, unless the received message or stream segment is less than 128 bytes in length. If BytesAvailable is greater than BytesIndicated, the driver has data that it does not present when it calls ClientEventReceiveExpedited.

BytesTaken

Points to the caller–defined memory location to which ClientEventReceiveExpedited writes the number of bytes of data it copies from the expedited TSDU.

Tsdu

Points to the TSDU.

IoRequestPacket

Points to the caller–defined memory location to which ClientEventReceiveExpedited writes a pointer to an IRP formatted for a receive request. If this parameter is NULL, the client will not be making such a request.

Return Value

ClientEventReceiveExpedited can return the following status codes:

STATUS_DATA_NOT_ACCEPTED
STATUS_MORE_PROCESSING_REQUIRED
STATUS_SUCCESS

For more information about status codes, see Part II, Chapter 10.

See Also

ClientEventReceive, TDI_SET_EVENT_HANDLER