summaryrefslogtreecommitdiff
path: root/DHTTransport.hs
diff options
context:
space:
mode:
Diffstat (limited to 'DHTTransport.hs')
-rw-r--r--DHTTransport.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/DHTTransport.hs b/DHTTransport.hs
index 3d008174..013fa322 100644
--- a/DHTTransport.hs
+++ b/DHTTransport.hs
@@ -21,6 +21,7 @@ module DHTTransport
21 , mapMessage 21 , mapMessage
22 , encrypt 22 , encrypt
23 , decrypt 23 , decrypt
24 , dhtMessageType
24 ) where 25 ) where
25 26
26import ToxAddress 27import ToxAddress
@@ -122,7 +123,7 @@ direct bs saddr f = fanGet bs getDHT f (asymNodeInfo saddr)
122 123
123-- Throws an error if called with a non-internet socket. 124-- Throws an error if called with a non-internet socket.
124asymNodeInfo :: SockAddr -> Assym a -> NodeInfo 125asymNodeInfo :: SockAddr -> Assym a -> NodeInfo
125asymNodeInfo saddr asym = either (error . mappend "asymNodeInfo: ") id $ nodeInfo (NodeId $ senderKey asym) saddr 126asymNodeInfo saddr asym = either (error . mappend "asymNodeInfo: ") id $ nodeInfo (key2id $ senderKey asym) saddr
126 127
127 128
128fanGet :: ByteString -> Get x -> (x -> a) -> (x -> b) -> Either String (a,b) 129fanGet :: ByteString -> Get x -> (x -> a) -> (x -> b) -> Either String (a,b)