def start_read_message(self):
    header = self.read_uint32()
    sequence = self.read_uint32()
    version = (header >> 24)
    if (version != self.BASIC_CODEC_VERSION):
        raise CodecError(('unsupported codec version %d' % version))
    service = ((header >> 16) & 255)
    request = ((header >> 8) & 255)
    msgType = MessageType((header & 255))
    return MessageInfo(type=msgType, service=service, request=request, sequence=sequence)
def start_read_message(self):
    header = self.read_uint32()
    sequence = self.read_uint32()
    version = (header >> 24)
    if (version != self.BASIC_CODEC_VERSION):
        raise CodecError(('unsupported codec version %d' % version))
    service = ((header >> 16) & 255)
    request = ((header >> 8) & 255)
    msgType = MessageType((header & 255))
    return MessageInfo(type=msgType, service=service, request=request, sequence=sequence)