SSLContext.set_npn_protocols(protocols)
Specify which protocols the socket should advertise during the SSL/TLS handshake. It should be a list of 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 the NPN draft specification. After a successful handshake, the SSLSocket.selected_npn_protocol()
method will return the agreed-upon protocol.
This method will raise NotImplementedError
if HAS_NPN
is False.
New in version 3.3.
Please login to continue.