EOS API reference page for EOS_P2P_CloseConnection

1분 소요

This function is part of the P2P Interface.


For all (or optionally one specific) Socket ID(s) with a specific peer: stop receiving packets, drop any locally queued packets, and if no other Socket ID is using the connection with the peer, close the underlying connection. If your application wants to migrate an existing connection with a peer it already connected to, it is recommended to call EOS_P2P_AcceptConnection with the new Socket ID first before calling EOS_P2P_CloseConnection, to prevent the shared physical socket from being torn down prematurely.

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_CloseConnectionOptions* OptionsInformation about who would like to close a connection, and which connection.