本文整理匯總了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"