scrape.go 365 B

12345678910111213
  1. package udp
  2. type ScrapeRequest []InfoHash
  3. type ScrapeResponse []ScrapeInfohashResult
  4. type ScrapeInfohashResult struct {
  5. // I'm not sure why the fields are named differently for HTTP scrapes.
  6. // https://www.bittorrent.org/beps/bep_0048.html
  7. Seeders int32 `bencode:"complete"`
  8. Completed int32 `bencode:"downloaded"`
  9. Leechers int32 `bencode:"incomplete"`
  10. }