本文整理汇总了Python中flextls.protocol.Protocol.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Protocol.__init__方法的具体用法?Python Protocol.__init__怎么用?Python Protocol.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flextls.protocol.Protocol
的用法示例。
在下文中一共展示了Protocol.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.payload = None
self.fields = [
VersionField("version"),
VectorUInt8Field("cookie")
]
示例2: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.length = 0
self.is_escape = None
self.padding_length = None
self.padding = b""
self.type = None
示例3: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.fields = [
VectorListUShortField(
"supported_signature_algorithms",
item_class=SignatureAndHashAlgorithmField
),
]
示例4: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.fields = [
VectorListUInt16Field(
"supported_signature_algorithms",
item_class=SignatureAndHashAlgorithmField,
item_class_args=[None, None]
),
]
示例5: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.fields = [
UInt8EnumField(
"type",
None,
{
1: "change_cipher_spec",
255: None
}
),
]
示例6: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.fields = [
UByteEnumField(
"type",
None,
{
1: "request",
2: "response",
255: None
}
),
UShortField("payload_length", 0)
]
self.padding = b""
self.payload_length_field = "payload_length"
self.payload_identifier_field = False
示例7: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.fields = [
UInt8EnumField(
"level",
None,
{
1: "warning",
2: "fatal",
255: None
}
),
UInt8EnumField(
"description",
None,
{
0: "close_notify",
10: "unexpected_message",
20: "bad_record_mac",
21: "decryption_failed_RESERVED",
22: "record_overflow",
30: "decompression_failure",
40: "handshake_failure",
41: "no_certificate_RESERVED",
42: "bad_certificate",
43: "unsupported_certificate",
44: "certificate_revoked",
45: "certificate_expired",
46: "certificate_unknown",
47: "illegal_parameter",
48: "unknown_ca",
49: "access_denied",
50: "decode_error",
51: "decrypt_error",
60: "export_restriction_RESERVED",
70: "protocol_version",
71: "insufficient_security",
80: "user_canceled",
90: "user_canceled",
100: "no_renegotiation",
110: "unsupported_extension",
255: None
}
),
]
示例8: __init__
# 需要导入模块: from flextls.protocol import Protocol [as 别名]
# 或者: from flextls.protocol.Protocol import __init__ [as 别名]
def __init__(self, **kwargs):
Protocol.__init__(self, **kwargs)
self.fields = [
UByteEnumField(
"type",
None,
{
0: "hello_request",
1: "client_hello",
2: "server_hello",
11: "certificate",
12: "server_key_exchange",
13: "certificate_request",
14: "server_hello_done",
15: "certificate_verify",
16: "client_key_exchange",
20: "finished",
255: None
}
),
UInteger3Field("length", 0),
]
self.payload_identifier_field = "type"
self.payload_length_field = "length"