SSLContext.set_alpn_protocols(protocols)
Specify which protocols the socket should advertise during the SSL/TLS handshake. It should be a list of ASCII strings, like ['http/1.1',
'spdy/2']
, ordered by preference. The selection of a protocol will happen during the handshake, and will play out according to RFC 7301. After a successful handshake, the SSLSocket.selected_alpn_protocol()
method will return the agreed-upon protocol.
This method will raise NotImplementedError
if HAS_ALPN
is False.
New in version 3.5.
Please login to continue.