From 9ee6f55b2aa3df52f8bdb9a53759644e4fd14694 Mon Sep 17 00:00:00 2001 From: Sam T Date: Fri, 14 Jun 2013 15:50:23 +0400 Subject: + Add docs to progress and client session. --- src/Network/BitTorrent.hs | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'src/Network/BitTorrent.hs') 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 module Data.Torrent -- * Session - , ClientSession - , newClient, defaultClient + -- ** Client + , ClientSession( clientPeerID, allowedExtensions ) - , SwarmSession + , ThreadCount + , defaultThreadCount + + , newClient + , defaultClient + + , getCurrentProgress + , getPeerCount + , getSwarmCount + + + -- ** Swarm + , SwarmSession(torrentMeta) , newLeacher, newSeeder , getSessionCount @@ -22,13 +34,22 @@ module Network.BitTorrent , discover -- * Peer to Peer - , P2P - , Event(..) , PeerSession ( connectedPeerAddr, enabledExtensions ) - , Block(..), BlockIx(..), ppBlock, ppBlockIx + , P2P + + -- ** Transfer + , Block(..), ppBlock + , BlockIx(..), ppBlockIx + -- ** Control + , disconnect + , protocolError + + -- ** Events + , Event(..) , awaitEvent, yieldEvent + -- * Extensions , Extension, defaultExtensions, ppExtension ) where @@ -48,6 +69,7 @@ import Network.BitTorrent.Extension import Network.BitTorrent.Peer +-- | Client session with default parameters. Use it for testing only. defaultClient :: IO ClientSession defaultClient = newClient defaultThreadCount defaultExtensions -- cgit v1.2.3