package meta import "net" type Event string const ( NoEvent Event = "" Started Event = "started" Stopped Event = "stopped" Completed Event = "completed" ) type TrackerRequest struct { InfoHash []byte // info_hash PeerID []byte // peer_id Port int Uploaded int Downloaded int Left int Compact bool // always true NoPeerID bool Event Event IP net.IPAddr NumWant int Key []byte TrackerID []byte } // 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"` TrackerId string `bencode:"tracker id"` WarningMessage string `bencode:"warning message"` }