Function caesar_core::sender::client::on_leave_room
source · fn on_leave_room(context: &mut Context, _: usize) -> StatusExpand description
Handle the leave room packet.
This function handles the leave room packet by aborting any ongoing task, generating a new random key, clearing the shared key, clearing the task, and printing an error message indicating that the transfer was interrupted because the receiver disconnected.
§Arguments
context- The sender context._- The index of the sender. Currently unused.
§Returns
A Status representing the result of the operation.
§Errors
Returns an error if there are still files being transferred.