Receives data from a peer.
HRESULT Receive( [in] ND_RESULT *pResult, [in, out] ND_SGE *pSgl, [in] SIZE_T nSge );
An ND_RESULT structure which will receive the status of the request. The status is set to one of the following status codes:
pSgl [in, out]
A list of ND_SGE structures that will receive the data that the peer sends.
The number of entries in the scatter/gather list. May be zero.
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.
The operation succeeded. Completion status will be returned through the outbound completion queue associated with the endpoint.
The request referenced more data than is supported by the underlying hardware.
The request would have exceeded the number of outbound requests allowed on this endpoint. The nOutboundEntries parameter of the INDConnector::CreateEndpoint method specifies the limit.
The number of scatter/gather entries in the scatter/gather list exceeded the number allowed on the endpoint. The nOutboundSge parameter of the INDConnector::CreateEndpoint method specifies the limit.
You can call this method before the endpoint is connected. For example, you call this method before calling the INDAdapter::CreateMemoryWindow method to prepare for the peer calling the INDEndpoint::SendAndInvalidate method.
You must post a Receive request before the peer posts a Send request (or SendAndInvalidate). The buffers that you specify must be large enough to receive the sent data. If not, the Send request fails and the connection is terminated; the completion status for the Receive request is ND_BUFFER_OVERFLOW. If the receive request fails, the endpoint can still process existing or future requests.
The protocol determines how many Receive requests you must post and the buffer size that is required for each post.
|Microsoft Message Passing Interface (MS-MPI)|
Build date: 7/2/2010