summaryrefslogtreecommitdiff
path: root/bittorrent/src/Network/BitTorrent/Tracker.hs
blob: 1191f9218e683e93307d21b3867553fce3d2282d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
-- |
--   Copyright   :  (c) Sam Truzjan 2013
--   License     :  BSD3
--   Maintainer  :  pxqr.sta@gmail.com
--   Stability   :  experimental
--   Portability :  non-portable
--
--   This module provides high level API for peer -> tracker
--   communication. Tracker is used to discover other peers in the
--   network using torrent info hash.
--
{-# LANGUAGE TemplateHaskell   #-}
module Network.BitTorrent.Tracker
       ( -- * RPC Manager
         PeerInfo (..)
       , Options
       , Manager
       , newManager
       , closeManager
       , withManager

         -- * Multitracker session
       , trackerList
       , Session
       , Event (..)
       , trackers
       , newSession
       , closeSession
       , withSession

         -- ** Events
       , AnnounceEvent (..)
       , notify
       , askPeers

         -- ** Session state
       , TrackerSession
       , trackerPeers
       , trackerScrape

       , tryTakeData
       , unsafeTryTakeData

       , getSessionState
       ) where

import Network.BitTorrent.Internal.Cache (tryTakeData, unsafeTryTakeData)
import Network.BitTorrent.Tracker.Message
import Network.BitTorrent.Tracker.List
import Network.BitTorrent.Tracker.RPC
import Network.BitTorrent.Tracker.Session