This project is relevant bittorrent protocol.
Current support a tui
program to use the downloader.
I will support the win/linux/android platform
by using yew
+ tauri
,
that is, the application will be wholly written by rust program language(with some js code for wasm-bingen).
Now only supporting basic BtTorrent
protocol, not including DHT
, Fast extension
Create Entity Entity:
graph TB
engine_spawn--> EngineHandle
engine_spawn--> AlertReceiver
EngineHandle-->|new|Engine
Engine-->|joinhandle + engine_tx|EngineHandle
Engine-->|new|Disk
Disk-->|jonhandle + disk_tx|Engine
Create a Torrent file instance:
graph TB
torrent_params-->|pass|Engine
Engine---engine_tx
engine_tx-->|create_torrent|Torrent
engine_tx-->|NewTorrent|Disk
Torrent-->|insert TorrentEntity|Engine
Components channels:
graph TB
Conf-->Engine
Engine==>|create|Alert_rx
Engine-->|create|Disk
Engine-->|create|TorrentA
Engine-->|create|TorrentB
Engine-->|Command Send|Disk
TorrentA-->|Command Send|Disk
TorrentB-->|Command Send|Disk
Engine-->|Command Send|TorrentA
Engine-->|Command Send|TorrentB
Disk==>|TorrentComplete or TorrentStats or Error|Alert_rx
Engine==>|TorrentComplete or TorrentStats or Error|Alert_rx
TorrentA==>|TorrentComplete or TorrentStats or Error|Alert_rx
TorrentB==>|TorrentComplete or TorrentStats or Error|Alert_rx
Shutdown() the engine and wait their joinhandle:
graph TB
EngineHandle-->|engine_tx|Engine
Engine-->|torrent_tx|TorrentA
Engine-->|torrent_tx|TorrentB
Engine-->|disk_tx|Disk