MCPcopy Index your code
hub / github.com/python/cpython / inner

Method inner

Lib/ssl.py:628–651  ·  view source on GitHub ↗
(conn, direction, version, content_type, msg_type, data)

Source from the content-addressed store, hash-verified

626 raise TypeError(f"{callback} is not callable.")
627
628 def inner(conn, direction, version, content_type, msg_type, data):
629 try:
630 version = TLSVersion(version)
631 except ValueError:
632 pass
633
634 try:
635 content_type = _TLSContentType(content_type)
636 except ValueError:
637 pass
638
639 if content_type == _TLSContentType.HEADER:
640 msg_enum = _TLSContentType
641 elif content_type == _TLSContentType.ALERT:
642 msg_enum = _TLSAlertType
643 else:
644 msg_enum = _TLSMessageType
645 try:
646 msg_type = msg_enum(msg_type)
647 except ValueError:
648 pass
649
650 return callback(conn, direction, version,
651 content_type, msg_type, data)
652
653 inner.user_function = callback
654

Callers 1

timeitMethod · 0.45

Calls 3

TLSVersionClass · 0.85
_TLSContentTypeClass · 0.85
callbackFunction · 0.70

Tested by

no test coverage detected