Hosting a tracker
Version 2 (olivier dufour, 04/08/2009 10:27 PM)
1 | 1 | h1. Tracker example |
|
---|---|---|---|
2 | 1 | ||
3 | 1 | <pre> |
|
4 | 2 | olivier dufour | <code class="java"> |
5 | 1 | ||
6 | 1 | tracker = new Tracker(); |
|
7 | 1 | tracker.AllowUnregisteredTorrents = true; |
|
8 | 1 | tracker.RegisterListener(listener); |
|
9 | 1 | listener.Start(); |
|
10 | 1 | ||
11 | 1 | //trackable inehrit from ITrackable and must implement getters: |
|
12 | 1 | // TorrentFile[] Files, InfoHash InfoHash, string Name |
|
13 | 1 | ||
14 | 1 | tracker.Add(trackable); |
|
15 | 1 | ||
16 | 1 | </code> |
|
17 | 1 | </pre> |