Share via


INDEndpoint::Send Method

Sends data to a remote peer.

Syntax

HRESULT Send(
  [in]  ND_RESULT *pResult,
  [in]  const ND_SGE *pSgl,
  [in]  SIZE_T nSge,
  [in]  DWORD Flags
);

Parameters

  • pResult [in]
    An ND_RESULT structure which will receive the status of the request. The status is set to one of the following status codes:

    ND_SUCCESS

    ND_LOCAL_LENGTH

    ND_ACCESS_VIOLATION

    ND_CANCELED

    ND_INVALID_REQUEST

    ND_FAILURE

    ND_TIMEOUT

    ND_REMOTE_ERROR

pSgl [in]

A list of ND_SGE structures that contain the data to send to the peer. May be NULL if nSge is zero, resulting in a zero-byte send and a corresponding zero-byte receive on the remote peer.

nSge [in]

The number of entries in the scatter/gather list. May be zero.

Flags [in]

The following flags control the behavior of the Send request. You can specify one or more of the following flags:

Value Meaning
ND_OP_FLAG_SILENT_SUCCESS 0x00000001

The successful completion of the request does not generate a completion on the outbound completion queue. Requests that fail will generate a completion.

ND_OP_FLAG_READ_FENCE 0x00000002

All prior Read requests must be complete before the hardware begins processing the Send request.

ND_OP_FLAG_SEND_AND_SOLICIT_EVENT 0x00000004

You can use this flag if you issue multiple, related Send requests. Set this flag only on the last, related Send request. The peer will receive all the Send requests as normal with the only difference being that when they receive the last Send request (the one with the ND_OP_FLAG_SEND_AND_SOLICIT_EVENT flag set), the completion queue for the peer generates a notification; the notification is generated after the receive completes.

This flag has no meaning to the receiver (peer) unless they have previously called the INDCompletionQueue::Notify method with the notification type set to NdCqNotifySolicited. Note that errors always satisfy a Notify request.

 

Return Value

When you implement this method, you should return the following return values. If you return others, try to use well-known values to aid in debugging issues.

Return code Description
ND_SUCCESS

The operation succeeded. Completion status will be returned through the outbound completion queue associated with the endpoint.

ND_CONNECTION_INVALID

The endpoint is not connected.

ND_BUFFER_OVERFLOW

The send request referenced more data than is supported by the underlying hardware.

ND_NO_MORE_ENTRIES

The request would have exceeded the number of outbound requests allowed on the endpoint. The nOutboundEntries parameter of the INDConnector::CreateEndpoint method specifies the limit.

ND_DATA_OVERRUN

The number of scatter/gather entries in the scatter/gather list of the request exceeded the number allowed on the endpoint. The nOutboundSge parameter of the INDConnector::CreateEndpoint method specifies the limit.

 

Remarks

If the method call fails, the endpoint can still process existing or future requests. However, if the INDCompletionQueue::GetResult method returns an ND_RESULT with an error status, the connect is terminated.

Requirements

Product

Microsoft Message Passing Interface (MS-MPI)

Header

Ndspi.h

See Also

INDEndpoint

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010