pub unsafe extern "C" fn EOS_P2P_CloseConnection(
Handle: EOS_HP2P,
Options: *const EOS_P2P_CloseConnectionOptions,
) -> EOS_EResultExpand description
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.
@param Options Information about who would like to close a connection, and which connection. @return EOS_EResult containing the result of the operation. Possible result codes:
- EOS_Success - if the provided data is valid
- EOS_InvalidParameters - if the provided data is invalid
@see EOS_P2P_CloseConnectionOptions