diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-05-31 16:31:29 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-05-31 16:31:29 +0000 |
commit | 25a12f1fd90c016424a4e017da28f7645240dfb3 (patch) | |
tree | 7f7831c3423d68c1f62732f7d9920840e299fda3 /src/Network/Tox.hs | |
parent | 5edbd08b22598310839bb2ad4a779fc70c5c54b8 (diff) |
need to actually send handshake
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r-- | src/Network/Tox.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index c3e559d7..c13c3b1a 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -325,11 +325,12 @@ netCryptoWithBackoff millisecs tox myseckey theirpubkey = do | |||
325 | } | 325 | } |
326 | newsession <- generateSecretKey | 326 | newsession <- generateSecretKey |
327 | timestamp <- getPOSIXTime | 327 | timestamp <- getPOSIXTime |
328 | -- (myhandshakeData,launchThreads) <- | 328 | (myhandshake,ioAction) |
329 | _ <- atomically $ freshCryptoSession (toxCryptoSessions tox) saddr newsession timestamp hp | 329 | <- atomically $ freshCryptoSession (toxCryptoSessions tox) saddr newsession timestamp hp |
330 | -- launchThreads | 330 | ioAction |
331 | -- forM myhandshake $ \response_handshake -> do | 331 | -- send handshake |
332 | -- sendHandshake sessions addr response_handshake | 332 | forM myhandshake $ \response_handshake -> do |
333 | sendHandshake (toxCryptoSessions tox) saddr response_handshake | ||
333 | let secnum :: Double | 334 | let secnum :: Double |
334 | secnum = fromIntegral millisecs / 1000000 | 335 | secnum = fromIntegral millisecs / 1000000 |
335 | delay = (millisecs * 5 `div` 4) | 336 | delay = (millisecs * 5 `div` 4) |