]> git.rkrishnan.org Git - functorrent.git/commitdiff
Peer: export bytesDownloaded function
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 5 Sep 2015 17:23:01 +0000 (22:53 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 5 Sep 2015 17:23:01 +0000 (22:53 +0530)
src/FuncTorrent/Peer.hs

index 9ca40f41efb7d4f774b0b53dc24caa6bd1bb7b79..ae95f838b38215279ca3150a6002a1086caefd1a 100644 (file)
@@ -1,7 +1,8 @@
 {-# LANGUAGE OverloadedStrings #-}
 module FuncTorrent.Peer
     (Peer(..),
-     handlePeerMsgs
+     handlePeerMsgs,
+     bytesDownloaded
     ) where
 
 import Prelude hiding (lookup, concat, replicate, splitAt, take, filter)
@@ -32,7 +33,7 @@ data PState = PState { handle :: Handle
 type PeerState = State PState
 
 data PieceDlState = Pending
-                  | InProgress
+                  | Downloading
                   | Have
                   deriving (Show, Eq)