From 3abf7cbe1b58633f9e4d5a6f6d9e1da95522a593 Mon Sep 17 00:00:00 2001 From: Sergey Ivanov Date: Wed, 19 Jul 2023 00:05:04 +0400 Subject: [PATCH] Enable encryption --- hbs2-peer/app/ProxyMessaging.hs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/hbs2-peer/app/ProxyMessaging.hs b/hbs2-peer/app/ProxyMessaging.hs index 626d9c22..0c2be25c 100644 --- a/hbs2-peer/app/ProxyMessaging.hs +++ b/hbs2-peer/app/ProxyMessaging.hs @@ -104,16 +104,18 @@ runProxyMessaging env = liftIO do instance Messaging ProxyMessaging L4Proto LBS.ByteString where - sendTo = sendToPlainProxyMessaging + sendTo = sendToProxyMessaging - receive bus _ = liftIO do - -- trace "PROXY: RECEIVE" - -- receive (view proxyUDP bus) w - let answ = view proxyAnswers bus - atomically $ do - r <- readTQueue answ - rs <- flushTQueue answ - pure (r:rs) + receive = receiveFromProxyMessaging + + -- receive bus _ = liftIO do + -- -- trace "PROXY: RECEIVE" + -- -- receive (view proxyUDP bus) w + -- let answ = view proxyAnswers bus + -- atomically $ do + -- r <- readTQueue answ + -- rs <- flushTQueue answ + -- pure (r:rs) sendToPlainProxyMessaging :: (MonadIO m) => ProxyMessaging