예제 #1
0
def parse_basic_publish_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicPublishParameters:
    parse_binary_shortstr(bio)
    return BasicPublishParameters(
        parse_shortstr(bio, encoding),
        parse_shortstr(bio, encoding),
        *parse_booleans(bio, 2)
    )
예제 #2
0
파일: queue.py 프로젝트: arthurdarcet/ammoo
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))
예제 #3
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))
예제 #4
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)
    )
예제 #5
0
def parse_basic_get_empty_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> None:
    parse_binary_shortstr(bio)
    return None
예제 #6
0
def parse_basic_get_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicGetParameters:
    parse_binary_shortstr(bio)
    return BasicGetParameters(
        parse_shortstr(bio, encoding),
        parse_boolean(bio)
    )
예제 #7
0
def parse_connection_open_ok_parameters(bio: BytesIO, encoding: str,
                                        rabbitmq: bool) -> None:
    parse_binary_shortstr(bio)  # reserved value, throw away
    return None
예제 #8
0
파일: queue.py 프로젝트: arthurdarcet/ammoo
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))
예제 #9
0
파일: queue.py 프로젝트: arthurdarcet/ammoo
def parse_queue_purge_parameters(bio: BytesIO, encoding: str,
                                 rabbitmq: bool) -> QueuePurgeParameters:
    parse_binary_shortstr(bio)
    return QueuePurgeParameters(parse_shortstr(bio, encoding),
                                parse_boolean(bio))
예제 #10
0
def parse_channel_open_parameters(bio: BytesIO, encoding: str,
                                  rabbitmq: bool) -> None:
    parse_binary_shortstr(bio)
    return None
예제 #11
0
def parse_exchange_delete_parameters(
        bio: BytesIO, encoding: str,
        rabbitmq: bool) -> ExchangeDeleteParameters:
    parse_binary_shortstr(bio)  # reserved
    return ExchangeDeleteParameters(parse_shortstr(bio, encoding),
                                    *parse_booleans(bio, 2))