diff options
author | joe <joe@jerkface.net> | 2017-09-15 06:22:10 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-09-15 06:22:10 -0400 |
commit | 12cbb3af2413dc28838ed271351dda16df8f7bdb (patch) | |
tree | 2db77a787e18a81a8369a8d73fee369d8826f064 /bittorrent/src/Network/BitTorrent/Tracker.hs | |
parent | 362357c6d08cbd8dffa627a1e80199dcb9ba231f (diff) |
Separating dht-client library from bittorrent package.
Diffstat (limited to 'bittorrent/src/Network/BitTorrent/Tracker.hs')
-rw-r--r-- | bittorrent/src/Network/BitTorrent/Tracker.hs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/bittorrent/src/Network/BitTorrent/Tracker.hs b/bittorrent/src/Network/BitTorrent/Tracker.hs new file mode 100644 index 00000000..6db67559 --- /dev/null +++ b/bittorrent/src/Network/BitTorrent/Tracker.hs | |||
@@ -0,0 +1,50 @@ | |||
1 | -- | | ||
2 | -- Copyright : (c) Sam Truzjan 2013 | ||
3 | -- License : BSD3 | ||
4 | -- Maintainer : pxqr.sta@gmail.com | ||
5 | -- Stability : experimental | ||
6 | -- Portability : non-portable | ||
7 | -- | ||
8 | -- This module provides high level API for peer -> tracker | ||
9 | -- communication. Tracker is used to discover other peers in the | ||
10 | -- network using torrent info hash. | ||
11 | -- | ||
12 | {-# LANGUAGE TemplateHaskell #-} | ||
13 | module Network.BitTorrent.Tracker | ||
14 | ( -- * RPC Manager | ||
15 | PeerInfo (..) | ||
16 | , Options | ||
17 | , Manager | ||
18 | , newManager | ||
19 | , closeManager | ||
20 | , withManager | ||
21 | |||
22 | -- * Multitracker session | ||
23 | , trackerList | ||
24 | , Session | ||
25 | , Event (..) | ||
26 | , newSession | ||
27 | , closeSession | ||
28 | , withSession | ||
29 | |||
30 | -- ** Events | ||
31 | , AnnounceEvent (..) | ||
32 | , notify | ||
33 | , askPeers | ||
34 | |||
35 | -- ** Session state | ||
36 | , TrackerSession | ||
37 | , trackerPeers | ||
38 | , trackerScrape | ||
39 | |||
40 | , tryTakeData | ||
41 | , unsafeTryTakeData | ||
42 | |||
43 | , getSessionState | ||
44 | ) where | ||
45 | |||
46 | import Network.BitTorrent.Internal.Cache (tryTakeData, unsafeTryTakeData) | ||
47 | import Network.BitTorrent.Tracker.Message | ||
48 | import Network.BitTorrent.Tracker.List | ||
49 | import Network.BitTorrent.Tracker.RPC | ||
50 | import Network.BitTorrent.Tracker.Session | ||