]> Sergey Matveev's repositories - btrtrc.git/blob - tracker/udp/scrape.go
Support scraping from HTTP trackers
[btrtrc.git] / tracker / udp / scrape.go
1 package udp
2
3 type ScrapeRequest []InfoHash
4
5 type ScrapeResponse []ScrapeInfohashResult
6
7 type ScrapeInfohashResult struct {
8         // I'm not sure why the fields are named differently for HTTP scrapes.
9         // https://www.bittorrent.org/beps/bep_0048.html
10         Seeders   int32 `bencode:"complete"`
11         Completed int32 `bencode:"downloaded"`
12         Leechers  int32 `bencode:"incomplete"`
13 }