summaryrefslogtreecommitdiff
path: root/dht/src/Data/Tox/Onion.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-12-11 04:57:49 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-01 23:26:04 -0500
commit458d053dcff411179d52d437087cce76b8af4a9c (patch)
tree024160df41772f0516e6449a3bfabdabfcd5e269 /dht/src/Data/Tox/Onion.hs
parent5b9374c79de82025bbb0ce47e0a93e6ddc0ece6c (diff)
Share TCP Relays with remote via onion message.
Diffstat (limited to 'dht/src/Data/Tox/Onion.hs')
-rw-r--r--dht/src/Data/Tox/Onion.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/dht/src/Data/Tox/Onion.hs b/dht/src/Data/Tox/Onion.hs
index 258a9f73..d3c8086d 100644
--- a/dht/src/Data/Tox/Onion.hs
+++ b/dht/src/Data/Tox/Onion.hs
@@ -25,6 +25,7 @@ import Crypto.Tox hiding (encrypt,decrypt)
25import Network.Tox.NodeId 25import Network.Tox.NodeId
26import qualified Crypto.Tox as ToxCrypto 26import qualified Crypto.Tox as ToxCrypto
27import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo) 27import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo)
28import Network.Tox.TCP.NodeId (fromUDPNode)
28 29
29import Control.Applicative 30import Control.Applicative
30import Control.Arrow 31import Control.Arrow
@@ -717,7 +718,7 @@ getNodeList = do
717 (:) n <$> (getNodeList <|> pure []) 718 (:) n <$> (getNodeList <|> pure [])
718 719
719instance S.Serialize AnnounceResponse where 720instance S.Serialize AnnounceResponse where
720 get = AnnounceResponse <$> S.get <*> (SendNodes <$> getNodeList) 721 get = AnnounceResponse <$> S.get <*> (SendNodes . map fromUDPNode <$> getNodeList)
721 put (AnnounceResponse st (SendNodes ns)) = S.put st >> mapM_ S.put ns 722 put (AnnounceResponse st (SendNodes ns)) = S.put st >> mapM_ S.put ns
722 723
723data DataToRoute = DataToRoute 724data DataToRoute = DataToRoute