Example #1
0
void MessageReader::onDescriptor(const Descriptor& descriptor, const char* position)
{
    if (bare.data) {
        if (descriptor.match(FOOTER_SYMBOL, FOOTER_CODE)) {
            bare.size = position - bare.data;
        }
    } else {
        if (descriptor.match(PROPERTIES_SYMBOL, PROPERTIES_CODE) || descriptor.match(APPLICATION_PROPERTIES_SYMBOL, APPLICATION_PROPERTIES_CODE)
            || descriptor.match(AMQP_SEQUENCE_SYMBOL, AMQP_SEQUENCE_CODE) || descriptor.match(AMQP_VALUE_SYMBOL, AMQP_VALUE_CODE) || descriptor.match(DATA_SYMBOL, DATA_CODE)) {
            bare.data = position;
        }
    }
}