summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker')
-rw-r--r--src/Network/BitTorrent/Tracker/Protocol.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Tracker/Protocol.hs b/src/Network/BitTorrent/Tracker/Protocol.hs
index 23bbe498..5ee61185 100644
--- a/src/Network/BitTorrent/Tracker/Protocol.hs
+++ b/src/Network/BitTorrent/Tracker/Protocol.hs
@@ -71,6 +71,7 @@ data Event = Started
71 -- ^ To be sent when the peer completes a download. 71 -- ^ To be sent when the peer completes a download.
72 deriving (Show, Read, Eq, Ord, Enum, Bounded) 72 deriving (Show, Read, Eq, Ord, Enum, Bounded)
73 73
74$(deriveJSON (L.map toLower . L.dropWhile isLower) ''Event)
74 75
75-- | A tracker request is HTTP GET request; used to include metrics 76-- | A tracker request is HTTP GET request; used to include metrics
76-- from clients that help the tracker keep overall statistics about 77-- from clients that help the tracker keep overall statistics about
@@ -111,6 +112,7 @@ data AnnounceQuery = AnnounceQuery {
111 -- ^ If not specified, the request is regular periodic request. 112 -- ^ If not specified, the request is regular periodic request.
112 } deriving Show 113 } deriving Show
113 114
115$(deriveJSON (L.map toLower . L.dropWhile isLower) ''AnnounceQuery)
114 116
115-- | The tracker response includes a peer list that helps the client 117-- | The tracker response includes a peer list that helps the client
116-- participate in the torrent. The most important is 'respPeer' list 118-- participate in the torrent. The most important is 'respPeer' list
@@ -141,6 +143,7 @@ data AnnounceInfo =
141 -- ^ Peers that must be contacted. 143 -- ^ Peers that must be contacted.
142 } deriving Show 144 } deriving Show
143 145
146$(deriveJSON (L.map toLower . L.dropWhile isLower) ''AnnounceInfo)
144 147
145-- | Ports typically reserved for bittorrent P2P listener. 148-- | Ports typically reserved for bittorrent P2P listener.
146defaultPorts :: [PortNumber] 149defaultPorts :: [PortNumber]