equal
deleted
inserted
replaced
50 waitPacket "NICK" |
50 waitPacket "NICK" |
51 sendPacket ["PROTO", "31"] |
51 sendPacket ["PROTO", "31"] |
52 waitPacket "PROTO" |
52 waitPacket "PROTO" |
53 b <- waitPacket "LOBBY:JOINED" |
53 b <- waitPacket "LOBBY:JOINED" |
54 --io $ print b |
54 --io $ print b |
|
55 sendPacket ["QUIT", "BYE"] |
55 return () |
56 return () |
56 |
57 |
57 testing = Control.OldException.handle print $ do |
58 testing = Control.OldException.handle print $ do |
58 putStr "+" |
59 putStr "+" |
59 sock <- connectTo "127.0.0.1" (PortNumber 46631) |
60 sock <- connectTo "127.0.0.1" (PortNumber 46631) |
60 evalStateT emulateSession sock |
61 evalStateT emulateSession sock |
61 --hClose sock |
62 --hClose sock |
62 putStr "-" |
63 putStr "-" |
63 hFlush stdout |
64 hFlush stdout |
64 |
65 |
65 forks = forever $ do |
66 forks = forM_ [1..100] $ const $ do |
66 delay <- randomRIO (10000::Int, 30000) |
67 delay <- randomRIO (10000::Int, 30000) |
67 threadDelay delay |
68 threadDelay delay |
68 forkIO testing |
69 forkIO testing |
69 |
70 |
70 main = withSocketsDo $ do |
71 main = withSocketsDo $ do |