gameServer/NetRoutines.hs
changeset 1926 cb46fbdcaa41
parent 1924 8f8fe856ce9d
child 1927 e2031906a347
equal deleted inserted replaced
1925:ec923e56c444 1926:cb46fbdcaa41
    24 		cHandle <- socketToHandle socket ReadWriteMode
    24 		cHandle <- socketToHandle socket ReadWriteMode
    25 		hSetBuffering cHandle LineBuffering
    25 		hSetBuffering cHandle LineBuffering
    26 		clientHost <- sockAddr2String sockAddr
    26 		clientHost <- sockAddr2String sockAddr
    27 
    27 
    28 		currentTime <- getCurrentTime
    28 		currentTime <- getCurrentTime
    29 		--putStrLn $ (show currentTime) ++ " new client id: " ++ (show nextID)
       
    30 		
    29 		
    31 		sendChan <- newChan
    30 		sendChan <- newChan
    32 
    31 
    33 		let newClient =
    32 		let newClient =
    34 				(ClientInfo
    33 				(ClientInfo
    35 					nextID
    34 					nextID
    36 					sendChan
    35 					sendChan
    37 					cHandle
    36 					cHandle
    38 					clientHost
    37 					clientHost
    39 					--currentTime
    38 					currentTime
    40 					""
    39 					""
    41 					""
    40 					""
    42 					False
    41 					False
    43 					0
    42 					0
    44 					0
    43 					0