summaryrefslogtreecommitdiff
path: root/src/Network/Tox.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r--src/Network/Tox.hs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index 4cff4f74..89a8d99f 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -408,14 +408,6 @@ getOnionAlias crypto dhtself remoteNode = atomically $ do
408 return $ Onion.OnionDestination Onion.SearchingAlias alias Nothing 408 return $ Onion.OnionDestination Onion.SearchingAlias alias Nothing
409 409
410 410
411retardSend micros client = do
412 mvar <- newMVar () :: IO (MVar ())
413 return client { clientEnterQuery = \tid -> do
414 takeMVar mvar
415 threadDelay micros
416 putMVar mvar ()
417 }
418
419newTox :: TVar Onion.AnnouncedKeys -- ^ Store of announced keys we are a rendezvous for. 411newTox :: TVar Onion.AnnouncedKeys -- ^ Store of announced keys we are a rendezvous for.
420 -> SockAddr -- ^ Bind-address to listen on. 412 -> SockAddr -- ^ Bind-address to listen on.
421 -> Maybe NetCryptoSessions -- ^ State of all one-on-one Tox links. 413 -> Maybe NetCryptoSessions -- ^ State of all one-on-one Tox links.
@@ -493,12 +485,9 @@ newTox keydb addr mbSessionsState suppliedDHTKey = do
493 (hookQueries orouter' DHT.transactionKey) 485 (hookQueries orouter' DHT.transactionKey)
494 (const id) 486 (const id)
495 487
496 -- onionclientSerialized <- serializeClient onionclient
497 onionRetarded <- retardSend 200000 onionclient
498
499 return Tox 488 return Tox
500 { toxDHT = dhtclient 489 { toxDHT = dhtclient
501 , toxOnion = onionRetarded 490 , toxOnion = onionclient
502 , toxToRoute = onInbound (updateContactInfo roster) dtacrypt 491 , toxToRoute = onInbound (updateContactInfo roster) dtacrypt
503 , toxCrypto = addHandler (hPutStrLn stderr) (sessionPacketH sessionsState) cryptonet 492 , toxCrypto = addHandler (hPutStrLn stderr) (sessionPacketH sessionsState) cryptonet
504 , toxHandshakes = addHandler (hPutStrLn stderr) (handshakeH sessionsState) handshakes 493 , toxHandshakes = addHandler (hPutStrLn stderr) (handshakeH sessionsState) handshakes