summaryrefslogtreecommitdiff
path: root/src/Network/Tox
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index f2c792cd..29f55e54 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -46,6 +46,7 @@ data HandshakeParams
46newHandShakeData :: TransportCrypto -> HandshakeParams -> HandshakeData 46newHandShakeData :: TransportCrypto -> HandshakeParams -> HandshakeData
47newHandShakeData = error "todo" 47newHandShakeData = error "todo"
48 48
49cryptoNetHandler :: NetCryptoSessions -> SockAddr -> NetCrypto -> IO (Maybe (NetCrypto -> NetCrypto))
49cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) nonce24 encrypted)) = do 50cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) nonce24 encrypted)) = do
50 let crypto = transportCrypto sessions 51 let crypto = transportCrypto sessions
51 allsessions = netCryptoSessions sessions 52 allsessions = netCryptoSessions sessions
@@ -122,4 +123,4 @@ cryptoNetHandler sessions addr (NetCrypto (CryptoPacket nonce16 encrypted)) = do
122 -- Handle Encrypted Message 123 -- Handle Encrypted Message
123 -- TODO 124 -- TODO
124 return Nothing 125 return Nothing
125cryptoNetHandlerr _ _ _ = return id 126-- cryptoNetHandler _ _ _ = return $ Just id