diff options
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 | ||