support following spec
- bep0003
http://www.bittorrent.org/beps/bep_0003.html
- bep0023
http://www.bittorrent.org/beps/bep_0023.html
基本 Torrent Client は、Tracker Server を利用して、他のTorrent Clientをつがします。つまり、Torrent でデータを共有したい場合は、Tracker Server が必要になります。
hetimatorrent example: server code
1 2 3 4 5 6 7 8 9 10 11 12 | a() {
TrackerServer trackerServer = new TrackerServer(new HetiSocketBuilderChrome())
..address = "0.0.0.0"
..port = 6969;
trackerServer.start().then((StartResult result) {});
List<int> infoHash = new List.filled(20, 1);
trackerServer.addInfoHash(infoHash);
new Future.delayed(new Duration(minutes: 30)).then((_) {
trackerServer.stop();
});
}
|
hetimatorrent example: client code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | b() {
TorrentFile torrentfile = null;
// ..
//create Torrent file Object from blob;
// ..
TrackerClient.createTrackerClient(new HetiSocketBuilderChrome(), torrentfile).then((TrackerClient client) {
client.downloaded = 0;
client.uploaded = 0;
client.event = TrackerClient.EVENT_STARTED;
client.requestWithSupportRedirect().then((TrackerRequestResult result) {
print("${result}");
});
});
}
|
Source
- hetimatorrent library
- HetimaTorrentTracker large sample
- Chrome store
https://chrome.google.com/webstore/detail/hetimatorrenttrackersampl/achgjpmkcelodbhjhhcjeolfehheahnc
-------
kyorohiro work

0 件のコメント:
コメントを投稿