pub async fn spawn<L>(
peer: Peer<L>,
shutdown_rx: Receiver<()>,
) -> Result<(), PeerError>Expand description
Spawn the peer with protocol router
This starts the iroh protocol router for handling incoming connections. The peer’s sync provider is responsible for managing its own background workers.
§Arguments
peer- The peer instance to runshutdown_rx- Watch receiver for shutdown signal