From 18e305f4dee1ab643e173061e7b12112035a1bdc Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 21 Jun 2016 20:33:08 +0200 Subject: move --- meta/tracker.go | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 meta/tracker.go (limited to 'meta') diff --git a/meta/tracker.go b/meta/tracker.go deleted file mode 100644 index 1150849..0000000 --- a/meta/tracker.go +++ /dev/null @@ -1,41 +0,0 @@ -package meta - -import "net" - -type Event string - -const ( - NoEvent Event = "" - Started Event = "started" - Stopped Event = "stopped" - Completed Event = "completed" -) - -type TrackerRequest struct { - InfoHash []byte `query:"info_hash"` // info_hash - PeerID []byte `query:"peer_id"` // peer_id - Port int `query:"port,optional"` - Uploaded int `query:"uploaded,optional"` - Downloaded int `query:"downloaded,optional"` - Left int `query:"left,optional"` - Compact bool `query:"compact,optional"` // always true - NoPeerID bool `query:"no_peer_id,optional"` - Event Event `query:"event,optional"` - IP net.IPAddr `query:"ip,optional"` - NumWant int `query:"numwant,optional"` - Key []byte `query:"key,optional"` - TrackerID []byte `query:"tracker_id,optional"` -} - -// we support only compact mode -type TrackerResponse struct { - Complete int `bencode:"complete"` - FalureReason string `bencode:"failure reason"` - Incomplete int `bencode:"incomplete"` - Interval int `bencode:"interval"` - MinInterval int `bencode:"min interval"` - Peers []byte `bencode:"peers"` - Peers6 []byte `bencode:"peers6"` - TrackerId string `bencode:"tracker id"` - WarningMessage string `bencode:"warning message"` -} -- cgit v1.2.3