diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-06-30 18:58:31 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-06-30 18:58:31 +0400 |
commit | d7b276585a4faccc7d78baafb7ea011f3135856a (patch) | |
tree | f78c3bc59fd5e6e7e3d28490c6f74f0741204271 /examples | |
parent | b6b992d5594daa9405e6a5259e161d65af815a88 (diff) |
~ Keep track left progress bytes.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Main.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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 | |||
13 | 13 | ||
14 | print (contentLayout "./" (tInfo torrent)) | 14 | print (contentLayout "./" (tInfo torrent)) |
15 | 15 | ||
16 | client <- newClient 100 [] | 16 | client <- newClient 10 [] |
17 | swarm <- newLeecher client torrent | 17 | swarm <- newLeecher client torrent |
18 | 18 | ||
19 | storage <- swarm `bindTo` "/tmp/" | 19 | storage <- swarm `bindTo` "/tmp/" |
@@ -22,5 +22,7 @@ main = do | |||
22 | 22 | ||
23 | discover swarm $ do | 23 | discover swarm $ do |
24 | liftIO $ print "connected to peer" | 24 | liftIO $ print "connected to peer" |
25 | forever $ exchange storage | 25 | forever $ do |
26 | liftIO $ print "disconnect to peer" \ No newline at end of file | 26 | liftIO (getCurrentProgress client >>= print) |
27 | exchange storage | ||
28 | liftIO $ print "disconnected" \ No newline at end of file | ||