diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-06-13 06:32:45 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-06-13 06:32:45 +0400 |
commit | 49caf224c2d51cae2ca2a345e9bcca4368e66701 (patch) | |
tree | df778b5f24f110b38fa8b211a322f681e024cae9 /exsamples | |
parent | 6042f69d711cddc0bb42457e0d16d45e7b34e431 (diff) |
~ Bound count of concurrent sessions.
Diffstat (limited to 'exsamples')
-rw-r--r-- | exsamples/Main.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/exsamples/Main.hs b/exsamples/Main.hs index a094b87a..2c879378 100644 --- a/exsamples/Main.hs +++ b/exsamples/Main.hs | |||
@@ -15,12 +15,12 @@ main = do | |||
15 | [path] <- getArgs | 15 | [path] <- getArgs |
16 | torrent <- fromFile path | 16 | torrent <- fromFile path |
17 | 17 | ||
18 | client <- newClient [] | 18 | client <- newClient 1 [] |
19 | swarm <- newLeacher client torrent | 19 | swarm <- newLeacher client torrent |
20 | 20 | ||
21 | ref <- newIORef 0 | ||
22 | |||
23 | discover swarm $ do | 21 | discover swarm $ do |
22 | ref <- liftIO $ newIORef 0 | ||
23 | |||
24 | addr <- asks connectedPeerAddr | 24 | addr <- asks connectedPeerAddr |
25 | liftIO $ print $ "connected to" ++ show addr | 25 | liftIO $ print $ "connected to" ++ show addr |
26 | 26 | ||
@@ -36,7 +36,6 @@ main = do | |||
36 | liftIO $ do | 36 | liftIO $ do |
37 | readIORef ref >>= print | 37 | readIORef ref >>= print |
38 | modifyIORef ref succ | 38 | modifyIORef ref succ |
39 | print (ppBlock blk) | ||
40 | 39 | ||
41 | yieldEvent (Want (BlockIx 0 0 (16 * 1024))) | 40 | yieldEvent (Want (BlockIx 0 0 (16 * 1024))) |
42 | 41 | ||