@@ -51,10 +51,10 @@ class HTTP20Connection(object):
51
51
:param enable_push: (optional) Whether the server is allowed to push
52
52
resources to the client (see
53
53
:meth:`get_pushes() <hyper.HTTP20Connection.get_pushes>`).
54
- :SSLContext : (optional) A class with custom certificate settings. If not provided
54
+ :ssl_context : (optional) A class with custom certificate settings. If not provided
55
55
then hyper's default SSLContext is used instead.
56
56
"""
57
- def __init__ (self , host , port = None , window_manager = None , enable_push = False , SSLContext = None ,
57
+ def __init__ (self , host , port = None , window_manager = None , enable_push = False , ssl_context = None ,
58
58
** kwargs ):
59
59
"""
60
60
Creates an HTTP/2 connection to a specific server.
@@ -69,7 +69,7 @@ def __init__(self, host, port=None, window_manager=None, enable_push=False, SSLC
69
69
self .host , self .port = host , port
70
70
71
71
self ._enable_push = enable_push
72
- self ._SSLContext = SSLContext
72
+ self .ssl_context = ssl_context
73
73
74
74
#: The size of the in-memory buffer used to store data from the
75
75
#: network. This is used as a performance optimisation. Increase buffer
@@ -209,7 +209,7 @@ def connect(self):
209
209
if self ._sock is None :
210
210
sock = socket .create_connection ((self .host , self .port ), 5 )
211
211
212
- sock , proto = wrap_socket (sock , self .host , self ._SSLContext )
212
+ sock , proto = wrap_socket (sock , self .host , self .ssl_context )
213
213
log .debug ("Selected NPN protocol: %s" , proto )
214
214
assert proto in H2_NPN_PROTOCOLS
215
215
0 commit comments