summaryrefslogtreecommitdiff
path: root/src/Network/Tox
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2017-11-21 05:16:36 +0000
committerJames Crayne <jim.crayne@gmail.com>2017-11-21 05:19:46 +0000
commitc6552bf260fb121da413668c3d835ef4bfec7548 (patch)
treefc59565f99f9ea0bf80b92bfc7aa42265dc14bee /src/Network/Tox
parent48ff993d35b45225cde3e0fbc6ebb775f3be4443 (diff)
move netCrypto init stub to Network.Tox
Diffstat (limited to 'src/Network/Tox')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index cbd820de..d43535ad 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -140,18 +140,6 @@ forgetCrypto crypto (NCSessions {netCryptoSessions,netCryptoSessionsByKey}) sess
140 [] -> Nothing 140 [] -> Nothing
141 ys -> Just ys) sPubKey) 141 ys -> Just ys) sPubKey)
142 142
143-- | initiate a netcrypto session, blocking
144netCrypto :: TransportCrypto -> NetCryptoSessions -> SecretKey -> PublicKey -> IO NetCryptoSession
145netCrypto crypto allsessions myseckey theirpubkey = do
146-- convert public key to NodeInfo check Roster
147-- if no session:
148-- 1) send dht key, actually maybe send dht-key regardless
149-- 2) send handshakes to last seen ip's, if any
150--
151-- if sessions found, is it using this private key?
152-- if not, send handshake, this is separate session
153 error "todo"
154
155newSessionsState :: TransportCrypto 143newSessionsState :: TransportCrypto
156 -> (MessageType -> NetCryptoHook) -- ^ default hook 144 -> (MessageType -> NetCryptoHook) -- ^ default hook
157 -> Map.Map MessageType [NetCryptoHook] -- ^ all hooks, can be empty to start 145 -> Map.Map MessageType [NetCryptoHook] -- ^ all hooks, can be empty to start