diff options
author | Joe Crayne <joe@jerkface.net> | 2019-12-11 04:57:49 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-01 23:26:04 -0500 |
commit | 458d053dcff411179d52d437087cce76b8af4a9c (patch) | |
tree | 024160df41772f0516e6449a3bfabdabfcd5e269 /dht/src/Data/Tox/Onion.hs | |
parent | 5b9374c79de82025bbb0ce47e0a93e6ddc0ece6c (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.hs | 3 |
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) | |||
25 | import Network.Tox.NodeId | 25 | import Network.Tox.NodeId |
26 | import qualified Crypto.Tox as ToxCrypto | 26 | import qualified Crypto.Tox as ToxCrypto |
27 | import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo) | 27 | import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo) |
28 | import Network.Tox.TCP.NodeId (fromUDPNode) | ||
28 | 29 | ||
29 | import Control.Applicative | 30 | import Control.Applicative |
30 | import Control.Arrow | 31 | import Control.Arrow |
@@ -717,7 +718,7 @@ getNodeList = do | |||
717 | (:) n <$> (getNodeList <|> pure []) | 718 | (:) n <$> (getNodeList <|> pure []) |
718 | 719 | ||
719 | instance S.Serialize AnnounceResponse where | 720 | instance 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 | ||
723 | data DataToRoute = DataToRoute | 724 | data DataToRoute = DataToRoute |