summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-12 21:47:11 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-12 21:47:11 +0400
commit1864fb2106c29b64af0cb80bebd91209b67d5fd3 (patch)
tree428627ef2b0a447c814d713de1d9e2cb00d6c1a8 /examples
parent0cd2099b36aa0382ec7363537ac9e2a8ca5831a9 (diff)
Add broadcast channel for P2P messaging
Diffstat (limited to 'examples')
-rw-r--r--examples/MkTorrent.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/MkTorrent.hs b/examples/MkTorrent.hs
index e9eb7f1a..87a7d45e 100644
--- a/examples/MkTorrent.hs
+++ b/examples/MkTorrent.hs
@@ -361,7 +361,8 @@ exchangeTorrent ih addr = do
361 pid <- genPeerId 361 pid <- genPeerId
362 var <- newEmptyMVar 362 var <- newEmptyMVar
363 let hs = Handshake def (toCaps [ExtExtended]) ih pid 363 let hs = Handshake def (toCaps [ExtExtended]) ih pid
364 connectWire () hs addr (toCaps [ExtMetadata]) $ do 364 chan <- newChan
365 connectWire () hs addr (toCaps [ExtMetadata]) chan $ do
365 infodict <- getMetadata 366 infodict <- getMetadata
366 liftIO $ putMVar var infodict 367 liftIO $ putMVar var infodict
367 takeMVar var 368 takeMVar var