summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent.hs')
-rw-r--r--src/Network/BitTorrent.hs34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/Network/BitTorrent.hs b/src/Network/BitTorrent.hs
index ce9f0149..8a8879bb 100644
--- a/src/Network/BitTorrent.hs
+++ b/src/Network/BitTorrent.hs
@@ -11,10 +11,22 @@ module Network.BitTorrent
11 module Data.Torrent 11 module Data.Torrent
12 12
13 -- * Session 13 -- * Session
14 , ClientSession 14 -- ** Client
15 , newClient, defaultClient 15 , ClientSession( clientPeerID, allowedExtensions )
16 16
17 , SwarmSession 17 , ThreadCount
18 , defaultThreadCount
19
20 , newClient
21 , defaultClient
22
23 , getCurrentProgress
24 , getPeerCount
25 , getSwarmCount
26
27
28 -- ** Swarm
29 , SwarmSession(torrentMeta)
18 , newLeacher, newSeeder 30 , newLeacher, newSeeder
19 , getSessionCount 31 , getSessionCount
20 32
@@ -22,13 +34,22 @@ module Network.BitTorrent
22 , discover 34 , discover
23 35
24 -- * Peer to Peer 36 -- * Peer to Peer
25 , P2P
26 , Event(..)
27 , PeerSession ( connectedPeerAddr, enabledExtensions ) 37 , PeerSession ( connectedPeerAddr, enabledExtensions )
28 , Block(..), BlockIx(..), ppBlock, ppBlockIx 38 , P2P
39
40 -- ** Transfer
41 , Block(..), ppBlock
42 , BlockIx(..), ppBlockIx
29 43
44 -- ** Control
45 , disconnect
46 , protocolError
47
48 -- ** Events
49 , Event(..)
30 , awaitEvent, yieldEvent 50 , awaitEvent, yieldEvent
31 51
52 -- * Extensions
32 , Extension, defaultExtensions, ppExtension 53 , Extension, defaultExtensions, ppExtension
33 ) where 54 ) where
34 55
@@ -48,6 +69,7 @@ import Network.BitTorrent.Extension
48import Network.BitTorrent.Peer 69import Network.BitTorrent.Peer
49 70
50 71
72-- | Client session with default parameters. Use it for testing only.
51defaultClient :: IO ClientSession 73defaultClient :: IO ClientSession
52defaultClient = newClient defaultThreadCount defaultExtensions 74defaultClient = newClient defaultThreadCount defaultExtensions
53 75