pub fn spawn_receive_handler<N: NetworkProvider + 'static>(
node: Arc<Node<N>>,
offer_tx: Sender<(FileOffer, OfferResponder)>,
event_tx: Sender<FileTransferEvent>,
) -> JoinHandle<()>Expand description
Spawn a background task that listens for incoming file transfer messages.
- OFFER: Creates a
FileOffer+OfferResponderpair, sends them on theoffer_txchannel, and waits up to 60 seconds for a decision. - PULL_REQUEST: Serves the requested file only if its canonicalized path
is inside a configured pull root (see
super::FileTransfer::add_pull_root); denied by default. - ACCEPT / REJECT: Ignored (handled by send/pull initiators).