[][src]Function cratetorrent::engine::spawn

pub fn spawn(conf: Conf) -> Result<(EngineHandle, AlertReceiver)>

Spawns the engine as a tokio task.

As with spawning other tokio tasks, it must be done within the context of a tokio executor.

The return value is a tuple of an EngineHandle, which may be used to send the engine commands, and an crate::alert::AlertReceiver, to which various components in the engine will send alerts of events.