Beispiel #1
0
def parse_queue_unbind_parameters(bio: BytesIO, encoding: str,
                                  rabbitmq: bool) -> QueueUnbindParameters:
    parse_binary_shortstr(bio)
    return QueueUnbindParameters(parse_shortstr(bio, encoding),
                                 parse_shortstr(bio, encoding),
                                 parse_shortstr(bio, encoding),
                                 parse_field_table(bio, encoding, rabbitmq))
Beispiel #2
0
def parse_exchange_declare_parameters(
        bio: BytesIO, encoding: str,
        rabbitmq: bool) -> ExchangeDeclareParameters:
    parse_binary_shortstr(bio)  # reserved
    return ExchangeDeclareParameters(
        parse_shortstr(bio, encoding), parse_shortstr(bio, encoding),
        *parse_booleans(bio, 5), parse_field_table(bio, encoding, rabbitmq))
Beispiel #3
0
def parse_basic_consume_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicConsumeParameters:
    parse_binary_shortstr(bio)
    return BasicConsumeParameters(
        parse_shortstr(bio, encoding),
        parse_shortstr(bio, encoding),
        *parse_booleans(bio, 4),
        parse_field_table(bio, encoding, rabbitmq)
    )
Beispiel #4
0
def parse_queue_declare_parameters(bio: BytesIO, encoding: str,
                                   rabbitmq: bool) -> QueueDeclareParameters:
    parse_binary_shortstr(bio)
    return QueueDeclareParameters(parse_shortstr(bio, encoding),
                                  parse_booleans(bio, 5),
                                  parse_field_table(bio, encoding, rabbitmq))