搜尋套件、儲存庫與 APP 分類

套件詳情v0.4.1

dtorrent_task

用純Dart語言編寫的BitTorrent下載客戶端套件。

AndroidiOSmacOSWindowsLinux
近 30 天下載
216
喜歡數
22
Pub 分數
130

安裝套件

flutter pub add dtorrent_task

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個完全以Dart實現的BitTorrent下載客戶端,可在不需要原生程式碼的情況下跨平台下載torrent。支援核心BitTorrent功能,例如種子、下載和管理torrent檔案。專為尋求輕量級純Dart解決方案,以在Android、iOS、macOS、Windows和Linux上進行檔案分享與點對點傳輸的開發者設計。此套件非常適合將torrent功能整合至Flutter應用中,且依賴項目極少。

適用情境

  • 將 torrent 下載整合到 Flutter 應用中
  • 建構點對點檔案共享應用程式
  • 透過BitTorrent自動傳輸檔案
  • 建立離線內容分發工具
  • 開發跨平台下載管理器

主要特色

  • 純 Dart 實現
  • 跨平台支援(Android、iOS、macOS、Windows、Linux)
  • 輕量且無依賴
  • 支援 torrent 檔案解析與下載管理
  • 用於追蹤下載進度的內建事件驅動架構

適合對象

  • Flutter 開發人員建構 P2P 功能
  • 需要離線或去中心化檔案傳輸的應用程式
  • 項目避免使用原生平台特定代碼
  • 探索BitTorrent協議的教育專案
  • 需要輕量級種子客戶端整合的工具

使用建議

  • 僅限基本的BitTorrent功能(不支援加密或通路轉送等進階功能)
  • 由於純 Dart 執行,低階裝置上的效能可能會有所差異
  • 無內建 UI 元件——需自訂介面開發
  • 依賴外部追蹤器和對等節點來確定內容的可用性
  • 不適用於高容量或企業級的種子操作

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

About

Dart library for implementing BitTorrent client.

codecov

Whole Dart Torrent client contains serival parts :

This package implements regular BitTorrent Protocol and manage above packages to work together for downloading.

BEP Support:

  • [BEP 0003 The BitTorrent Protocol Specification]
  • [BEP 0005 DHT Protocal]
  • [BEP 0006 Fast Extension]
  • [BEP 0010 Extension Protocol]
  • [BEP 0011 Peer Exchange (PEX)]
  • [BEP 0014 Local Service Discovery]
  • [BEP 0015 UDP Tracker Protocal]
  • [BEP 0029 uTorrent transport protocol]
  • [BEP 0055 Holepunch extension]

Developing:

  • [BEP 0009 Extension for Peers to Send Metadata Files]

Other support will come soon.

How to use

This package need to dependency dtorrent_parser:

dependencies:
  dtorrent_parser : ^1.0.4
  dtorrent_task : '>= 0.2.1 < 2.0.0'

First , create a Torrent model via .torrent file:

  var model = await Torrent.parse('some.torrent');

Second, create a Torrent Task and start it:

  var task = TorrentTask.newTask(model,'savepath');
  task.start();

User can add some listener to monitor TorrentTask running:

  task.onTaskComplete(() => .....);
  task.onFileComplete((String filePath) => .....);

and there is some method to control the TorrentTask:

   // Stop task:
   task.stop();
   // Pause task:
   task.pause();
   // Resume task:
   task.resume();

Testing

Run tests:

dart test

Run tests with coverage:

dart test --coverage=coverage
dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib

Or use the provided script:

dart tool/coverage.dart

The coverage report will be generated at coverage/lcov.info and can be viewed with tools like genhtml or uploaded to services like Codecov.

Coverage is automatically uploaded to Codecov on every push and pull request via GitHub Actions.

所屬分類

依賴

依賴清單 13 項

  • args^2.4.2
  • b_encode_decode^1.0.5
  • bittorrent_dht^0.0.14
  • collection^1.0.0
  • crypto^3.0.3
  • dart_ipify^1.1.1
  • dtorrent_common^1.0.8
  • dtorrent_parser^1.0.9
  • dtorrent_tracker^1.3.20
  • events_emitter2^1.0.3
  • logging^1.2.0
  • mime^1.0.4
  • utp_protocol^1.0.5

原始碼儲存庫

使用此套件的專案

暫無相關資料。