MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _encode_hostname

Method _encode_hostname

tools/python-3.11.9-amd64/Lib/ssl.py:503–509  ·  view source on GitHub ↗
(self, hostname)

Source from the content-addressed store, hash-verified

501 return self
502
503 def _encode_hostname(self, hostname):
504 if hostname is None:
505 return None
506 elif isinstance(hostname, str):
507 return hostname.encode('idna').decode('ascii')
508 else:
509 return hostname.decode('ascii')
510
511 def wrap_socket(self, sock, server_side=False,
512 do_handshake_on_connect=True,

Callers 3

wrap_bioMethod · 0.95
shim_cbMethod · 0.95
_createMethod · 0.80

Calls 2

decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected