gameServer/OfficialServer/checker.hs
changeset 10017 de822cd3df3a
parent 10014 56d2f2d5aad8
child 10440 b74a7bbe224e
child 10460 8dcea9087d75
equal deleted inserted replaced
10015:4feced261c68 10017:de822cd3df3a
    26 
    26 
    27 readInt_ :: (Num a) => B.ByteString -> a
    27 readInt_ :: (Num a) => B.ByteString -> a
    28 readInt_ str =
    28 readInt_ str =
    29   case B.readInt str of
    29   case B.readInt str of
    30        Just (i, t) | B.null t -> fromIntegral i
    30        Just (i, t) | B.null t -> fromIntegral i
    31        _                      -> 0 
    31        _                      -> 0
    32 
    32 
    33 data Message = Packet [B.ByteString]
    33 data Message = Packet [B.ByteString]
    34              | CheckFailed B.ByteString
    34              | CheckFailed B.ByteString
    35              | CheckSuccess [B.ByteString]
    35              | CheckSuccess [B.ByteString]
    36     deriving Show
    36     deriving Show