torrent 0.0.2 copy "torrent: ^0.0.2" to clipboard
torrent: ^0.0.2 copied to clipboard

unlisted

Bittorrent library inplemented in pure Dart.

example/torrent_example.dart

import 'package:logging/logging.dart';
import 'package:torrent/torrent.dart';
import 'package:torrent/auxlib.dart';

main() async {
  BtLog.setLevel(Level.FINER);

  final info = await loadFile('test/data/hot.torrent');
  dumpInfo(info, brief: true);

  final agent = BtAgentCore();
  final torrent = agent.addTorrent(info);

  await torrent.verifyLocalData();
  print(torrent.percent() * 100);
  print(torrent.absentPieces());

  torrent.startAllTrackers();
  torrent.downloadAll();
}
4
likes
25
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

Bittorrent library inplemented in pure Dart.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

ansicolor, async, base32, collection, easy_udp, logging, path, torrent_bencode, torrent_parser

More

Packages that depend on torrent