EOS API reference page for EOS_P2P_AddNotifyPeerConnectionEstablished

2 분 소요

This function is part of the P2P Interface.


Listen for when a connection is established. This is fired when we first connect to a peer, when we reconnect to a peer after a connection interruption, and when our underlying network connection type changes (for example, from a direct connection to relay, or vice versa). Network Connection Type changes will always be broadcast with a EOS_CET_Reconnection connection type, even if the connection was not interrupted.

Return Value

A valid notification ID if successfully bound, or EOS_INVALID_NOTIFICATIONID otherwise

See Also

EOS_P2P_AddNotifyPeerConnectionInterrupted, EOS_P2P_AddNotifyPeerConnectionClosed, EOS_P2P_RemoveNotifyPeerConnectionEstablished



Parameter Type And NameUsage Information
EOS_HP2P Handle
const EOS_P2P_AddNotifyPeerConnectionEstablishedOptions* OptionsInformation about who would like notifications about established connections, and for which socket
void* ClientDataThis value is returned to the caller when ConnectionEstablishedHandler is invoked
EOS_P2P_OnPeerConnectionEstablishedCallback ConnectionEstablishedHandlerThe callback to be fired when a connection has been established

Callback Function Information

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

Callback Remarks

Callback for information related to new connections being established

Callback Parameters


Parameter Type And NameUsage Information
const EOS_P2P_OnPeerConnectionEstablishedInfo* Data