--- a/gameServer/stresstest3.hs Sun Feb 06 18:59:53 2011 +0300
+++ b/gameServer/stresstest3.hs Sun Feb 06 21:50:29 2011 +0300
@@ -2,8 +2,8 @@
module Main where
-import IO
import System.IO
+import System.IO.Error
import Control.Concurrent
import Network
import Control.OldException
@@ -22,12 +22,11 @@
readPacket :: StateT SState IO [String]
readPacket = do
h <- get
- p <- io $ hGetPacket h []
- return p
+ io $ hGetPacket h []
where
hGetPacket h buf = do
l <- hGetLine h
- if (not $ null l) then hGetPacket h (buf ++ [l]) else return buf
+ if not $ null l then hGetPacket h (buf ++ [l]) else return buf
waitPacket :: String -> StateT SState IO Bool
waitPacket s = do
@@ -46,7 +45,7 @@
emulateSession = do
n <- io $ randomRIO (100000::Int, 100100)
waitPacket "CONNECTED"
- sendPacket ["NICK", "test" ++ (show n)]
+ sendPacket ["NICK", "test" ++ show n]
waitPacket "NICK"
sendPacket ["PROTO", "31"]
waitPacket "PROTO"