INDConnector::Accept Method
Accepts a pending connection request and assigns an endpoint to use in the data exchange.
Syntax
HRESULT Accept(
[in] INDEndpoint *pEndpoint,
[in, optional] const VOID *pPrivateData,
[in] SIZE_T PrivateDataLength,
[in, out] OVERLAPPED *pOverlapped
);
Parameters
pEndpoint [in]
An INDEndpoint interface that defines the endpoint to connect to the peer's endpoint. The endpoint must have been created using this instance of the Connector object.pPrivateData [in, optional]
Private data to transmit to the peer. Can be NULL if PrivateDataLength is zero.PrivateDataLength [in]
The size, in bytes, of the pPrivateData buffer.pOverlapped [in, out]
A pointer to an OVERLAPPED structure that is used to indicate completion of the operation.
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. |
ND_PENDING | The request is pending and will be completed when the connection is fully established. |
ND_CANCELED | The endpoint was removed. |
ND_DEVICE_REMOVED | The underlying Network Direct adapter was removed from the system. |
ND_CONNECTION_ACTIVE | The specified endpoint is already connected. |
ND_CONNECTION_ABORTED | The connecting peer aborted the connection establishment. |
ND_ACCESS_VIOLATION | The pPrivateData buffer is not valid for the size specified in PrivateDataLength. |
ND_BUFFER_OVERFLOW | The specified buffer length exceeds the capabilities of the underlying Network Direct hardware. The limits are reported in the ND_ADAPTER_INFO structure (see INDAdapter::Query). |
ND_TIMEOUT | The peer did not call the INDConnector::CompleteConnect method to complete the connection. |
Remarks
Calling this method causes the peer's connection request to complete.
An endpoint can be connected to only one other endpoint at a time.
The inbound and outbound read limits that you specify in the endpoint object are the limits that will be used for the connection. The connecting peer calls the INDConnector::GetConnectionData to get the limits and determines if the limits are acceptable. If the limits are acceptable, the connecting peer calls the INDConnector::CompleteConnect method; otherwise, the peer calls the INDConnector::Reject method to cancel the connection.
Requirements
Product |
Microsoft Message Passing Interface (MS-MPI) |
Header |
Ndspi.h |
See Also
Send comments about this topic to Microsoft
Build date: 7/2/2010