diff options
author | James Crayne <jim.crayne@gmail.com> | 2017-10-31 03:55:35 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2017-10-31 03:55:35 +0000 |
commit | 368bb61f147b2b59cf33ada8e76f285a1992a4f1 (patch) | |
tree | e11e427927938cd4834d80c790117e88d09ae580 /src/Network | |
parent | 13d617b0b8389d702cb0a615fc359f4be27402f7 (diff) |
NetCrypto wip
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/Tox.hs | 4 |
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 | |||
89 | import Data.Word64Map (fitsInInt) | 89 | import Data.Word64Map (fitsInInt) |
90 | import qualified Data.Word64Map (empty) | 90 | import qualified Data.Word64Map (empty) |
91 | import Network.Tox.Crypto.Transport (NetCrypto) | 91 | import Network.Tox.Crypto.Transport (NetCrypto) |
92 | import Network.Tox.Crypto.Handlers (newSessionsState, cryptoNetHandler) | ||
92 | import qualified Network.Tox.DHT.Handlers as DHT | 93 | import qualified Network.Tox.DHT.Handlers as DHT |
93 | import qualified Network.Tox.DHT.Transport as DHT | 94 | import qualified Network.Tox.DHT.Transport as DHT |
94 | import Network.Tox.NodeId | 95 | import 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 |