aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/torrent.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/torrent.go b/meta/torrent.go
index 3e8774a..434d50d 100644
--- a/meta/torrent.go
+++ b/meta/torrent.go
@@ -30,3 +30,22 @@ type Torrent struct {
URLList string `bencode:"url-list,optional"`
InfoHash []byte `bencode:"-"`
}
+
+type TrackerResponse struct {
+ FalureReason string `bencode:"failure reason"`
+ WarningMessage string `bencode:"warning message"`
+ Interval int `bencode:"interval"`
+ MinInterval int `bencode:"min interval"`
+ TrackerId string `bencode:"tracker id"`
+ Complete int `bencode:"complete"`
+ Incomplete int `bencode:"incomplete"`
+ Peers Peer `bencode:"peers"`
+}
+
+type Peer struct {
+ PeerId string `bencode:"peer id"`
+ IP string `bencode:"ip"`
+ Port string `bencode:"ports"`
+}
+
+// Peer (compact) []byte