summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker.hs
blob: 44923dc781c154f3607523745871be8cffc5cb77 (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
-- |
--   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
       , newSession
       , closeSession

         -- ** Events
       , Event (..)
       , 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