From d7b276585a4faccc7d78baafb7ea011f3135856a Mon Sep 17 00:00:00 2001 From: Sam T Date: Sun, 30 Jun 2013 18:58:31 +0400 Subject: ~ Keep track left progress bytes. --- examples/Main.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/Main.hs b/examples/Main.hs index 8d976aed..18cbefe3 100644 --- a/examples/Main.hs +++ b/examples/Main.hs @@ -13,7 +13,7 @@ main = do print (contentLayout "./" (tInfo torrent)) - client <- newClient 100 [] + client <- newClient 10 [] swarm <- newLeecher client torrent storage <- swarm `bindTo` "/tmp/" @@ -22,5 +22,7 @@ main = do discover swarm $ do liftIO $ print "connected to peer" - forever $ exchange storage - liftIO $ print "disconnect to peer" \ No newline at end of file + forever $ do + liftIO (getCurrentProgress client >>= print) + exchange storage + liftIO $ print "disconnected" \ No newline at end of file -- cgit v1.2.3