diff options
author | James Crayne <jim.crayne@gmail.com> | 2015-06-22 21:51:59 -0400 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2015-06-22 21:51:59 -0400 |
commit | a4592a399181aa27bde2ff954eb1077735474566 (patch) | |
tree | b383eeca3c78996c3c311491f332a36d7a56dab7 /KikiD/ClientState.hs | |
parent | ceec3fd413272bb47336ef2f7af42e1e44c9cc97 (diff) |
Serialization, refactoring...
Diffstat (limited to 'KikiD/ClientState.hs')
-rw-r--r-- | KikiD/ClientState.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/KikiD/ClientState.hs b/KikiD/ClientState.hs new file mode 100644 index 0000000..a80a392 --- /dev/null +++ b/KikiD/ClientState.hs | |||
@@ -0,0 +1,14 @@ | |||
1 | module KikiD.ClientState where | ||
2 | |||
3 | import KikiD.Message | ||
4 | import Control.Concurrent.STM.TBMQueue | ||
5 | import Control.Concurrent | ||
6 | |||
7 | data ClientState = CState {cliQueue :: TBMQueue KikiDMessage} | ||
8 | |||
9 | mkClient = CState | ||
10 | { cliQueue = error "ERROR CState: cliQueue parameter is required" | ||
11 | } | ||
12 | |||
13 | type ClientID = ThreadId | ||
14 | threadIdToClient = id | ||