equal
deleted
inserted
replaced
17 (cHandle, host, port) <- accept servSock |
17 (cHandle, host, port) <- accept servSock |
18 cChan <- atomically newTChan |
18 cChan <- atomically newTChan |
19 forkIO $ clientLoop cHandle cChan |
19 forkIO $ clientLoop cHandle cChan |
20 atomically $ writeTChan acceptChan (ClientInfo cChan cHandle "" 0 "" False) |
20 atomically $ writeTChan acceptChan (ClientInfo cChan cHandle "" 0 "" False) |
21 hPutStrLn cHandle "CONNECTED\n" |
21 hPutStrLn cHandle "CONNECTED\n" |
|
22 hFlush cHandle |
22 acceptLoop servSock acceptChan |
23 acceptLoop servSock acceptChan |
23 |
24 |
24 |
25 |
25 listenLoop :: Handle -> [String] -> TChan [String] -> IO () |
26 listenLoop :: Handle -> [String] -> TChan [String] -> IO () |
26 listenLoop handle buf chan = do |
27 listenLoop handle buf chan = do |