EOS API reference page for EOS_P2P_AddNotifyPeerConnectionRequest

This function is part of the P2P Interface.


Listen for incoming connection requests on a particular Socket ID, or optionally all Socket IDs. The bound function will only be called if the connection has not already been accepted.

Return Value

A valid notification ID if successfully bound, or EOS_INVALID_NOTIFICATIONID otherwise


Parameter Type And Name

Usage Information

EOS_HP2P Handle

const EOS_P2P_AddNotifyPeerConnectionRequestOptions* Options

Information about who would like notifications, and (optionally) only for a specific socket

void* ClientData

This value is returned to the caller when ConnectionRequestHandler is invoked

EOS_P2P_OnIncomingConnectionRequestCallback ConnectionRequestHandler

The callback to be fired when we receive a connection request

This function enables your callback (the ConnectionRequestHandler parameter) to respond to events that happen on the back-end service. Remember to remove your callback function when it is no longer needed.

Callback Function Information

Because this function is asynchronous, it employs a callback of type EOS_P2P_OnIncomingConnectionRequestCallback to report the results of its operation.

Callback Remarks

Callback for information related to incoming connection requests.

Callback Parameters

Parameter Type And Name

Usage Information

const EOS_P2P_OnIncomingConnectionRequestInfo* Data

Related API Members