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.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index 2f22993f..c43542b1 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -344,6 +344,9 @@ data NetCryptoSession = NCrypto
344 -- helps ensure lossless packets are processed in order 344 -- helps ensure lossless packets are processed in order
345 , ncRequestInterval :: TVar Int 345 , ncRequestInterval :: TVar Int
346 -- ^ How long (in microseconds) to wait between packet requests 346 -- ^ How long (in microseconds) to wait between packet requests
347 -- , ncStoredRequests :: CyclicBuffer CryptoData
348 -- ^ Store the last 5 packet requests, try handling in any order
349 -- if the connection seems like it is locked (TODO)
347 , ncRequestThread :: TVar (Maybe ThreadId) 350 , ncRequestThread :: TVar (Maybe ThreadId)
348 -- ^ thread which sends packet requests 351 -- ^ thread which sends packet requests
349 , ncDequeueThread :: TVar (Maybe ThreadId) 352 , ncDequeueThread :: TVar (Maybe ThreadId)
@@ -602,6 +605,7 @@ freshCryptoSession sessions
602 Just theirSessionKey -> createNetCryptoOutQueue sessions newsession theirSessionKey pktq ncMyPacketNonce0 ncOutgoingIdMap0 605 Just theirSessionKey -> createNetCryptoOutQueue sessions newsession theirSessionKey pktq ncMyPacketNonce0 ncOutgoingIdMap0
603 mbpktoqVar <- newTVar mbpktoq 606 mbpktoqVar <- newTVar mbpktoq
604 lastNQ <- CB.new 10 0 :: STM (CyclicBuffer (Bool,(ViewSnapshot,InOrOut CryptoMessage))) 607 lastNQ <- CB.new 10 0 :: STM (CyclicBuffer (Bool,(ViewSnapshot,InOrOut CryptoMessage)))
608 -- ncStoredRequests0 <- CB.new 5 0 :: STM (CyclicBuffer CryptoData)
605 listeners <- newTVar IntMap.empty 609 listeners <- newTVar IntMap.empty
606 msgNum <- newTVar 0 610 msgNum <- newTVar 0
607 dropNum <- newTVar 0 611 dropNum <- newTVar 0
@@ -637,6 +641,7 @@ freshCryptoSession sessions
637 , ncOutgoingIdMapEscapedLossless = losslessEscapeIdMap 641 , ncOutgoingIdMapEscapedLossless = losslessEscapeIdMap
638 , ncView = ncView0 642 , ncView = ncView0
639 , ncPacketQueue = pktq 643 , ncPacketQueue = pktq
644 -- , ncStoredRequests = ncStoredRequests0 (TODO)
640 , ncRequestInterval = ncRequestInterval0 645 , ncRequestInterval = ncRequestInterval0
641 , ncRequestThread = ncRequestThread0 646 , ncRequestThread = ncRequestThread0
642 , ncDequeueThread = ncDequeueThread0 647 , ncDequeueThread = ncDequeueThread0