diff options
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 12 |
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 | |||
990 | noArgPing _ _ _ = return Nothing | 990 | noArgPing _ _ _ = return Nothing |
991 | 991 | ||
992 | newXmmpSource :: Tox.NetCryptoSession -> C.Source IO Tox.CryptoMessage | 992 | newXmmpSource :: Tox.NetCryptoSession -> C.Source IO Tox.CryptoMessage |
993 | newXmmpSource sessions = do | 993 | newXmmpSource 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 | ||
1000 | newXmmpSink :: Tox.NetCryptoSession -> C.Sink (Flush Tox.CryptoMessage) IO () | 1000 | newXmmpSink :: Tox.NetCryptoSession -> C.Sink (Flush Tox.CryptoMessage) IO () |
1001 | newXmmpSink sessions = C.awaitForever $ \flush_cyptomessage -> do | 1001 | newXmmpSink sessions = C.awaitForever $ \flush_cyptomessage -> do |