示例#1
0
def parse_basic_get_ok_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicGetOkParameters:
    return BasicGetOkParameters(
        parse_long_long_uint(bio),
        parse_boolean(bio),
        parse_shortstr(bio, encoding),
        parse_shortstr(bio, encoding),
        parse_long_uint(bio)
    )
示例#2
0
def parse_basic_deliver_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicDeliverParameters:
    return BasicDeliverParameters(
        parse_shortstr(bio, encoding),
        parse_long_long_uint(bio),
        parse_boolean(bio),
        parse_shortstr(bio, encoding),
        parse_shortstr(bio, encoding)
    )
示例#3
0
def parse_queue_bind_parameters(bio: BytesIO, encoding: str,
                                rabbitmq: bool) -> QueueBindParameters:
    parse_binary_shortstr(bio)
    return QueueBindParameters(parse_shortstr(bio, encoding),
                               parse_shortstr(bio, encoding),
                               parse_shortstr(bio, encoding),
                               parse_boolean(bio),
                               parse_field_table(bio, encoding, rabbitmq))
示例#4
0
def parse_exchange_bind_parameters(bio: BytesIO, encoding: str,
                                   rabbitmq: bool) -> ExchangeBindParameters:
    parse_binary_shortstr(bio)  # reserved
    return ExchangeBindParameters(parse_shortstr(bio, encoding),
                                  parse_shortstr(bio, encoding),
                                  parse_shortstr(bio, encoding),
                                  parse_boolean(bio),
                                  parse_field_table(bio, encoding, rabbitmq))
示例#5
0
def parse_basic_qos_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicQosParameters:
    return BasicQosParameters(
        parse_long_uint(bio),
        parse_short_uint(bio),
        parse_boolean(bio)
    )
示例#6
0
def parse_basic_recover_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> Requeue:
    return parse_boolean(bio)
示例#7
0
def parse_basic_reject_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicRejectParameters:
    return BasicRejectParameters(
        parse_long_long_uint(bio),
        parse_boolean(bio)
    )
示例#8
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)
    )
示例#9
0
def parse_basic_cancel_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> BasicCancelParameters:
    return BasicCancelParameters(
        parse_shortstr(bio, encoding),
        parse_boolean(bio)
    )
示例#10
0
def parse_confirm_select_parameters(bio: BytesIO, encoding: str, rabbitmq: bool) -> NoWait:
    return parse_boolean(bio)
示例#11
0
def parse_connection_open_parameters(
        bio: BytesIO, encoding: str,
        rabbitmq: bool) -> ConnectionOpenParameters:
    return ConnectionOpenParameters(parse_shortstr(bio, encoding),
                                    parse_split_shortstr(bio, encoding),
                                    parse_boolean(bio))
示例#12
0
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))
示例#13
0
def parse_channel_flow_parameters(bio: BytesIO, encoding: str,
                                  rabbitmq: bool) -> FlowActive:
    return parse_boolean(bio)