diff options
-rw-r--r-- | src/Network/BitTorrent/Tracker.hs | 9 | ||||
-rw-r--r-- | src/Network/BitTorrent/Tracker/HTTP.hs | 15 | ||||
-rw-r--r-- | src/Network/BitTorrent/Tracker/Protocol.hs | 19 |
3 files changed, 27 insertions, 16 deletions
diff --git a/src/Network/BitTorrent/Tracker.hs b/src/Network/BitTorrent/Tracker.hs index 75cbdf9b..d069730f 100644 --- a/src/Network/BitTorrent/Tracker.hs +++ b/src/Network/BitTorrent/Tracker.hs | |||
@@ -5,14 +5,9 @@ | |||
5 | -- Stability : experimental | 5 | -- Stability : experimental |
6 | -- Portability : non-portable | 6 | -- Portability : non-portable |
7 | -- | 7 | -- |
8 | -- This module provides high level API for peer->tracker | 8 | -- This module provides high level API for peer -> tracker |
9 | -- communication. Tracker is used to discover other peers in the | 9 | -- communication. Tracker is used to discover other peers in the |
10 | -- network. | 10 | -- network using torrent info hash. |
11 | -- | ||
12 | -- By convention most trackers support another form of request, | ||
13 | -- which queries the state of a given torrent (or all torrents) that | ||
14 | -- the tracker is managing. This module also provides a way to | ||
15 | -- easily request scrape info for a particular torrent list. | ||
16 | -- | 11 | -- |
17 | {-# LANGUAGE OverloadedStrings #-} | 12 | {-# LANGUAGE OverloadedStrings #-} |
18 | {-# LANGUAGE RecordWildCards #-} | 13 | {-# LANGUAGE RecordWildCards #-} |
diff --git a/src/Network/BitTorrent/Tracker/HTTP.hs b/src/Network/BitTorrent/Tracker/HTTP.hs index 38388316..fe690b96 100644 --- a/src/Network/BitTorrent/Tracker/HTTP.hs +++ b/src/Network/BitTorrent/Tracker/HTTP.hs | |||
@@ -1,3 +1,18 @@ | |||
1 | -- | | ||
2 | -- Copyright : (c) Sam T. 2013 | ||
3 | -- License : MIT | ||
4 | -- Maintainer : pxqr.sta@gmail.com | ||
5 | -- Stability : experimental | ||
6 | -- Portability : non-portable | ||
7 | -- | ||
8 | -- The tracker is an HTTP/HTTPS service used to discovery peers for | ||
9 | -- a particular existing torrent and keep statistics about the | ||
10 | -- swarm. This module also provides a way to easily request scrape | ||
11 | -- info for a particular torrent list. | ||
12 | -- | ||
13 | -- For more information see: | ||
14 | -- <https://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol> | ||
15 | -- | ||
1 | {-# LANGUAGE OverloadedStrings #-} | 16 | {-# LANGUAGE OverloadedStrings #-} |
2 | module Network.BitTorrent.Tracker.HTTP | 17 | module Network.BitTorrent.Tracker.HTTP |
3 | ( askTracker, leaveTracker | 18 | ( askTracker, leaveTracker |
diff --git a/src/Network/BitTorrent/Tracker/Protocol.hs b/src/Network/BitTorrent/Tracker/Protocol.hs index f5898d36..44398920 100644 --- a/src/Network/BitTorrent/Tracker/Protocol.hs +++ b/src/Network/BitTorrent/Tracker/Protocol.hs | |||
@@ -3,19 +3,20 @@ | |||
3 | -- License : MIT | 3 | -- License : MIT |
4 | -- Maintainer : pxqr.sta@gmail.com | 4 | -- Maintainer : pxqr.sta@gmail.com |
5 | -- Stability : experimental | 5 | -- Stability : experimental |
6 | -- Portability : non-portable | 6 | -- Portability : portable |
7 | -- | 7 | -- |
8 | -- Every tracker should support announce query. This query is used | ||
9 | -- to discover peers within swarm and have two-fold effect: | ||
8 | -- | 10 | -- |
9 | -- This module provides straigthforward Tracker protocol | 11 | -- * peer doing announce discover other peers using peer list from |
10 | -- implementation. The tracker is an HTTP/HTTPS service used to | 12 | -- the response to the announce query. |
11 | -- discovery peers for a particular existing torrent and keep | ||
12 | -- statistics about the swarm. | ||
13 | -- | 13 | -- |
14 | -- For more convenient high level API see | 14 | -- * tracker store peer information and use it in the succeeding |
15 | -- "Network.BitTorrent.Tracker" module. | 15 | -- requests made by other peers, until the peer info expires. |
16 | -- | 16 | -- |
17 | -- For more information see: | 17 | -- By convention most trackers support another form of request -- |
18 | -- <https://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol> | 18 | -- scrape query -- which queries the state of a given torrent (or |
19 | -- a list of torrents) that the tracker is managing. | ||
19 | -- | 20 | -- |
20 | {-# OPTIONS -fno-warn-orphans #-} | 21 | {-# OPTIONS -fno-warn-orphans #-} |
21 | {-# LANGUAGE OverloadedStrings #-} | 22 | {-# LANGUAGE OverloadedStrings #-} |