summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2017-10-31 21:43:18 +0000
committerJames Crayne <jim.crayne@gmail.com>2017-10-31 21:43:18 +0000
commitafc322ec9fdb230feac94cbf62300ccb79b9bb42 (patch)
tree82b29dbdf640b95729c63a557724d701fcf98581 /src/Network/Tox/Crypto
parente7543a3f661aad9310ca662f5e24b3f6083039a9 (diff)
groupchat state variable
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index 95ba7217..8a0e3fd9 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -18,6 +18,7 @@ import Data.Function
18import Data.Serialize as S 18import Data.Serialize as S
19import Data.Word 19import Data.Word
20import GHC.Conc (unsafeIOToSTM) 20import GHC.Conc (unsafeIOToSTM)
21import qualified Data.Set as Set
21 22
22-- util, todo: move to another module 23-- util, todo: move to another module
23maybeToEither :: Maybe b -> Either String b 24maybeToEither :: Maybe b -> Either String b
@@ -45,6 +46,7 @@ data NetCryptoSession = NCrypto { ncState :: TVar NetCryptoSessionStatus
45 , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session 46 , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session
46 -- needs to possibly start another, as is 47 -- needs to possibly start another, as is
47 -- the case in group chats 48 -- the case in group chats
49 , ncGroups :: TVar (Map.Map GroupChatId (Set.Set SockAddr))
48 } 50 }
49 51
50data NetCryptoSessions = NCSessions { netCryptoSessions :: TVar (Map.Map SockAddr NetCryptoSession) 52data NetCryptoSessions = NCSessions { netCryptoSessions :: TVar (Map.Map SockAddr NetCryptoSession)