mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-08 11:08:52 +08:00
python: Set NPN in HTTP2Server.__init__
This commit is contained in:
@@ -948,6 +948,11 @@ class HTTP2Server:
|
|||||||
return _HTTP2Session(RequestHandlerClass)
|
return _HTTP2Session(RequestHandlerClass)
|
||||||
|
|
||||||
self.loop = asyncio.get_event_loop()
|
self.loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
|
if ssl:
|
||||||
|
ssl.set_npn_protocols([cnghttp2.NGHTTP2_PROTO_VERSION_ID\
|
||||||
|
.decode('utf-8')])
|
||||||
|
|
||||||
coro = self.loop.create_server(session_factory,
|
coro = self.loop.create_server(session_factory,
|
||||||
host=address[0], port=address[1],
|
host=address[0], port=address[1],
|
||||||
ssl=ssl)
|
ssl=ssl)
|
||||||
|
|||||||
Reference in New Issue
Block a user