EOS API reference page for EOS_P2P_AcceptConnection

2 分で読めます

This function is part of the P2P Interface.


Accept or Request a connection with a specific peer on a specific Socket ID. If this connection was not already locally accepted, we will securely message the peer, and trigger a PeerConnectionRequest notification notifying them of the connection request. If the PeerConnectionRequest notification is not bound for all Socket IDs or for the requested Socket ID in particular, the request will be silently ignored. If the remote peer accepts the connection, a notification will be broadcast to the EOS_P2P_AddNotifyPeerConnectionEstablished when the connection is ready to send packets. If multiple Socket IDs are accepted with one peer, they will share one physical socket. Even if a connection is already locally accepted, EOS_EResult::EOS_Success will still be returned if the input was valid.

Return Value

  • EOS_EResult::EOS_Success - if the provided data is valid

  • EOS_EResult::EOS_InvalidParameters - if the provided data is invalid



Parameter Type And NameUsage Information
EOS_HP2P Handle
const EOS_P2P_AcceptConnectionOptions* OptionsInformation about who would like to accept a connection, and which connection