diff options
author | jim@bo <jim@bo> | 2018-06-21 05:55:32 -0400 |
---|---|---|
committer | jim@bo <jim@bo> | 2018-06-21 05:55:32 -0400 |
commit | 43aced9d6c73135a21c877a79e7e5c920cebe5bb (patch) | |
tree | fb49808fc3ce7fe898683d696585f30e1033e833 /src/Network/Tox/Crypto/Handlers.hs | |
parent | 064aba3a5dcf255015dcd2d4da7d4811c22287c9 (diff) |
Packet request Thread, ready for testing
Diffstat (limited to 'src/Network/Tox/Crypto/Handlers.hs')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 356ddf24..1cb9c48e 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -755,7 +755,13 @@ runUponHandshake netCryptoSession0 addr pktoq = do | |||
755 | atomically (readTVar (ncRequestInterval netCryptoSession0)) >>= threadDelay | 755 | atomically (readTVar (ncRequestInterval netCryptoSession0)) >>= threadDelay |
756 | nums <- atomically $ PQ.getMissing pktq | 756 | nums <- atomically $ PQ.getMissing pktq |
757 | dput XNetCrypto $ "(Request Thread) Missing Packets detected:" ++ show nums | 757 | dput XNetCrypto $ "(Request Thread) Missing Packets detected:" ++ show nums |
758 | dput XNetCrypto $ "TODO: compose PacketRequest message and send it." | 758 | getOutGoingParam <- PQ.readyOutGoing pktoq |
759 | atomically $ do | ||
760 | seqno <- PQ.getLastDequeuedPlus1 pktq | ||
761 | ogresult <- PQ.tryAppendQueueOutgoing getOutGoingParam pktoq (createRequestPacket seqno nums) | ||
762 | case ogresult of | ||
763 | PQ.OGSuccess -> return () | ||
764 | _ -> retry | ||
759 | loop | 765 | loop |
760 | dput XNetCrypto $ "runUponHandshake: " ++ show threadid ++ " = NetCryptoRequest." ++ show (key2id remotePublicKey) ++ sidStr | 766 | dput XNetCrypto $ "runUponHandshake: " ++ show threadid ++ " = NetCryptoRequest." ++ show (key2id remotePublicKey) ++ sidStr |
761 | -- launch dequeueOutgoing thread | 767 | -- launch dequeueOutgoing thread |