当前位置: 首页>>代码示例>>Python>>正文


Python Protocol.__init__方法代码示例

本文整理汇总了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")
     ]
开发者ID:DinoTools,项目名称:python-flextls,代码行数:9,代码来源:__init__.py

示例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
开发者ID:DinoTools,项目名称:python-flextls,代码行数:9,代码来源:record.py

示例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
         ),
     ]
开发者ID:tyll,项目名称:python-flextls,代码行数:10,代码来源:extension.py

示例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]
         ),
     ]
开发者ID:DinoTools,项目名称:python-flextls,代码行数:11,代码来源:extension.py

示例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
             }
         ),
     ]
开发者ID:DinoTools,项目名称:python-flextls,代码行数:14,代码来源:change_cipher_spec.py

示例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
开发者ID:tyll,项目名称:python-flextls,代码行数:19,代码来源:heartbeat.py

示例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
             }
         ),
     ]
开发者ID:DinoTools,项目名称:python-flextls,代码行数:47,代码来源:alert.py

示例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"
开发者ID:tyll,项目名称:python-flextls,代码行数:26,代码来源:__init__.py


注:本文中的flextls.protocol.Protocol.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。