equal
deleted
inserted
replaced
1 {-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} |
1 {-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} |
2 module NetRoutines where |
2 module NetRoutines where |
3 |
3 |
4 import Network.Socket |
4 import Network.Socket |
5 import System.IO |
|
6 import Control.Concurrent.Chan |
5 import Control.Concurrent.Chan |
7 import qualified Control.Exception as Exception |
6 import qualified Control.Exception as Exception |
8 import Data.Time |
7 import Data.Time |
9 import Control.Monad |
8 import Control.Monad |
|
9 import Data.Unique |
10 ----------------------------- |
10 ----------------------------- |
11 import CoreTypes |
11 import CoreTypes |
12 import Utils |
12 import Utils |
13 import RoomsAndClients |
13 import RoomsAndClients |
14 |
14 |
23 |
23 |
24 currentTime <- getCurrentTime |
24 currentTime <- getCurrentTime |
25 |
25 |
26 sendChan' <- newChan |
26 sendChan' <- newChan |
27 |
27 |
|
28 uid <- newUnique |
|
29 |
28 let newClient = |
30 let newClient = |
29 (ClientInfo |
31 (ClientInfo |
|
32 uid |
30 sendChan' |
33 sendChan' |
31 sock |
34 sock |
32 clientHost |
35 clientHost |
33 currentTime |
36 currentTime |
34 "" |
37 "" |