summaryrefslogtreecommitdiff
path: root/dht/src/Network/Tox/Onion/Handlers.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-12-01 20:22:30 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-01 23:22:52 -0500
commitbb190ea0bb2671214aad75f43f06a7c41c94f2bd (patch)
treea6c749eab356aeec91032e2ffdcd456aeebba73b /dht/src/Network/Tox/Onion/Handlers.hs
parent7c88315f6e01e203c537fa3193a83acd3a7afa2c (diff)
Remove query-id dependency from timeout computation.
Diffstat (limited to 'dht/src/Network/Tox/Onion/Handlers.hs')
-rw-r--r--dht/src/Network/Tox/Onion/Handlers.hs15
1 files changed, 7 insertions, 8 deletions
diff --git a/dht/src/Network/Tox/Onion/Handlers.hs b/dht/src/Network/Tox/Onion/Handlers.hs
index 25713aa1..3ea7395f 100644
--- a/dht/src/Network/Tox/Onion/Handlers.hs
+++ b/dht/src/Network/Tox/Onion/Handlers.hs
@@ -212,7 +212,7 @@ handlers net routing toks keydb AnnounceType
212handlers net _ _ keydb _ = Just $ NoReply Right $ dataToRouteH keydb net 212handlers net _ _ keydb _ = Just $ NoReply Right $ dataToRouteH keydb net
213 213
214 214
215toxidSearch :: (TransactionId -> OnionDestination r -> STM (OnionDestination r, Int)) 215toxidSearch :: (OnionDestination r -> STM (OnionDestination r, Int))
216 -> TransportCrypto 216 -> TransportCrypto
217 -> Client r 217 -> Client r
218 -> Search NodeId (IP, PortNumber) Nonce32 NodeInfo Rendezvous 218 -> Search NodeId (IP, PortNumber) Nonce32 NodeInfo Rendezvous
@@ -224,7 +224,7 @@ toxidSearch getTimeout crypto client = Search
224 , searchK = 6 224 , searchK = 6
225 } 225 }
226 226
227announceSerializer :: (TransactionId -> OnionDestination r -> STM (OnionDestination r, Int)) 227announceSerializer :: (OnionDestination r -> STM (OnionDestination r, Int))
228 -> MethodSerializer 228 -> MethodSerializer
229 TransactionId 229 TransactionId
230 (OnionDestination r) 230 (OnionDestination r)
@@ -276,7 +276,7 @@ unwrapAnnounceResponse alias ni (AnnounceResponse is_stored (SendNodes ns))
276-- started. 276-- started.
277 277
278 278
279sendOnion :: (TransactionId -> OnionDestination r -> STM (OnionDestination r, Int)) 279sendOnion :: (OnionDestination r -> STM (OnionDestination r, Int))
280 -> Client r 280 -> Client r
281 -> AnnounceRequest 281 -> AnnounceRequest
282 -> OnionDestination r 282 -> OnionDestination r
@@ -291,8 +291,7 @@ sendOnion getTimeout client req oaddr unwrap =
291 (return . Just . unwrap (onionNodeInfo oaddr)) 291 (return . Just . unwrap (onionNodeInfo oaddr))
292 $ join mb 292 $ join mb
293 293
294asyncOnion :: (TransactionId 294asyncOnion :: (OnionDestination r -> STM (OnionDestination r, Int))
295 -> OnionDestination r -> STM (OnionDestination r, Int))
296 -> QR.Client 295 -> QR.Client
297 err 296 err
298 PacketKind 297 PacketKind
@@ -316,7 +315,7 @@ asyncOnion getTimeout client req oaddr unwrap go =
316 315
317 316
318-- | Lookup the secret counterpart for a given alias key. 317-- | Lookup the secret counterpart for a given alias key.
319getRendezvous :: (TransactionId -> OnionDestination r -> STM (OnionDestination r, Int)) 318getRendezvous :: (OnionDestination r -> STM (OnionDestination r, Int))
320 -> TransportCrypto 319 -> TransportCrypto
321 -> Client r 320 -> Client r
322 -> NodeId 321 -> NodeId
@@ -334,7 +333,7 @@ getRendezvous getTimeout crypto client nid ni = do
334 (unwrapAnnounceResponse rkey) 333 (unwrapAnnounceResponse rkey)
335 334
336asyncGetRendezvous 335asyncGetRendezvous
337 :: (TransactionId -> OnionDestination r -> STM (OnionDestination r, Int)) 336 :: (OnionDestination r -> STM (OnionDestination r, Int))
338 -> TransportCrypto 337 -> TransportCrypto
339 -> Client r 338 -> Client r
340 -> NodeId 339 -> NodeId
@@ -353,7 +352,7 @@ asyncGetRendezvous getTimeout crypto client nid ni go = do
353 (unwrapAnnounceResponse rkey) 352 (unwrapAnnounceResponse rkey)
354 go 353 go
355 354
356putRendezvous :: (TransactionId -> OnionDestination r -> STM (OnionDestination r, Int)) 355putRendezvous :: (OnionDestination r -> STM (OnionDestination r, Int))
357 -> TransportCrypto 356 -> TransportCrypto
358 -> Client r 357 -> Client r
359 -> PublicKey 358 -> PublicKey