summaryrefslogtreecommitdiff
path: root/src/Network/Tox.hs
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2017-10-31 03:55:35 +0000
committerJames Crayne <jim.crayne@gmail.com>2017-10-31 03:55:35 +0000
commit368bb61f147b2b59cf33ada8e76f285a1992a4f1 (patch)
treee11e427927938cd4834d80c790117e88d09ae580 /src/Network/Tox.hs
parent13d617b0b8389d702cb0a615fc359f4be27402f7 (diff)
NetCrypto wip
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r--src/Network/Tox.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index d5db6979..4cc762c4 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -89,6 +89,7 @@ import Crypto.Tox
89import Data.Word64Map (fitsInInt) 89import Data.Word64Map (fitsInInt)
90import qualified Data.Word64Map (empty) 90import qualified Data.Word64Map (empty)
91import Network.Tox.Crypto.Transport (NetCrypto) 91import Network.Tox.Crypto.Transport (NetCrypto)
92import Network.Tox.Crypto.Handlers (newSessionsState, cryptoNetHandler)
92import qualified Network.Tox.DHT.Handlers as DHT 93import qualified Network.Tox.DHT.Handlers as DHT
93import qualified Network.Tox.DHT.Transport as DHT 94import qualified Network.Tox.DHT.Transport as DHT
94import Network.Tox.NodeId 95import Network.Tox.NodeId
@@ -308,11 +309,12 @@ newTox keydb addr = do
308 (const id) 309 (const id)
309 310
310 roster <- newRoster 311 roster <- newRoster
312 sessionsState <- newSessionsState crypto
311 return Tox 313 return Tox
312 { toxDHT = dhtclient 314 { toxDHT = dhtclient
313 , toxOnion = onionclient 315 , toxOnion = onionclient
314 , toxToRoute = onInbound (updateRoster roster) dtacrypt 316 , toxToRoute = onInbound (updateRoster roster) dtacrypt
315 , toxCrypto = cryptonet 317 , toxCrypto = addHandler (error "printErrors stderr") (cryptoNetHandler sessionsState) cryptonet
316 , toxCryptoKeys = crypto 318 , toxCryptoKeys = crypto
317 , toxRouting = routing 319 , toxRouting = routing
318 , toxTokens = toks 320 , toxTokens = toks