summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker/RPC/HTTP.hs')
-rw-r--r--src/Network/BitTorrent/Tracker/RPC/HTTP.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
index 00fc9331..37ddb5ad 100644
--- a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
+++ b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
@@ -5,10 +5,7 @@
5-- Stability : provisional 5-- Stability : provisional
6-- Portability : portable 6-- Portability : portable
7-- 7--
8-- The tracker is an HTTP/HTTPS service used to discovery peers for 8-- This module implement HTTP tracker protocol.
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-- 9--
13-- For more information see: 10-- For more information see:
14-- <https://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol> 11-- <https://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol>
@@ -102,12 +99,15 @@ data Manager = Manager
102 , httpMgr :: !HTTP.Manager 99 , httpMgr :: !HTTP.Manager
103 } 100 }
104 101
102-- |
105newManager :: Options -> IO Manager 103newManager :: Options -> IO Manager
106newManager opts = Manager opts <$> HTTP.newManager (optHttpOptions opts) 104newManager opts = Manager opts <$> HTTP.newManager (optHttpOptions opts)
107 105
106-- |
108closeManager :: Manager -> IO () 107closeManager :: Manager -> IO ()
109closeManager Manager {..} = HTTP.closeManager httpMgr 108closeManager Manager {..} = HTTP.closeManager httpMgr
110 109
110-- | Normally you need to use 'Control.Monad.Trans.Resource.allocate'.
111withManager :: Options -> (Manager -> IO a) -> IO a 111withManager :: Options -> (Manager -> IO a) -> IO a
112withManager opts = bracket (newManager opts) closeManager 112withManager opts = bracket (newManager opts) closeManager
113 113