equal
deleted
inserted
replaced
70 answer :: [B.ByteString] -> IO () |
70 answer :: [B.ByteString] -> IO () |
71 answer p = do |
71 answer p = do |
72 debugM "Network" $ "Send: " ++ show p |
72 debugM "Network" $ "Send: " ++ show p |
73 sendAll s $ B.unlines p `B.snoc` '\n' |
73 sendAll s $ B.unlines p `B.snoc` '\n' |
74 onPacket :: [B.ByteString] -> IO () |
74 onPacket :: [B.ByteString] -> IO () |
75 onPacket ("CONNECTED":_) = answer ["CHECKER", protocolNumber, l, p] |
75 onPacket ("CONNECTED":_) = do |
|
76 answer ["CHECKER", protocolNumber, l, p] |
|
77 answer ["READY"] |
76 onPacket ["PING"] = answer ["PONG"] |
78 onPacket ["PING"] = answer ["PONG"] |
77 onPacket ("BYE" : xs) = error $ show xs |
79 onPacket ("BYE" : xs) = error $ show xs |
78 onPacket _ = return () |
80 onPacket _ = return () |
79 |
81 |
80 |
82 |