pub async fn start_receiver(
    filepath: String,
    relay: &str,
    name: &str
) -> Result<()>
Expand description

Start the receiver process.

This function initiates the receiver process by performing the following steps:

  1. Replaces the protocol of the given relay URL.
  2. Downloads the room information from the server.
  3. Connects to the local or relay server based on the platform.
  4. Downloads the file from the server.

§Arguments

  • filepath - The path to the file to be received.
  • relay - The URL of the relay server.
  • name - The name of the receiver.

§Returns

Returns a Result indicating the success or failure of the receiver process.