summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 8fd1402d..6e2647d1 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -990,12 +990,12 @@ noArgPing f [] x = f x
990noArgPing _ _ _ = return Nothing 990noArgPing _ _ _ = return Nothing
991 991
992newXmmpSource :: Tox.NetCryptoSession -> C.Source IO Tox.CryptoMessage 992newXmmpSource :: Tox.NetCryptoSession -> C.Source IO Tox.CryptoMessage
993newXmmpSource sessions = do 993newXmmpSource session = do
994 v <- liftIO $ _todo sessions {- receive a fucking message -} 994 v <- liftIO $ Tox.receiveCrypto session
995 case v of 995 case v of
996 Nothing -> return () -- Nothing indicates EOF. 996 Nothing -> return () -- Nothing indicates EOF.
997 Just cryptomessage -> do C.yield cryptomessage 997 Just cryptomessage -> do C.yield cryptomessage
998 newXmmpSource sessions 998 newXmmpSource session
999 999
1000newXmmpSink :: Tox.NetCryptoSession -> C.Sink (Flush Tox.CryptoMessage) IO () 1000newXmmpSink :: Tox.NetCryptoSession -> C.Sink (Flush Tox.CryptoMessage) IO ()
1001newXmmpSink sessions = C.awaitForever $ \flush_cyptomessage -> do 1001newXmmpSink sessions = C.awaitForever $ \flush_cyptomessage -> do