From a05a6ef1ca781e2f98fb4332284aca649f24f75d Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sun, 11 Sep 2016 21:11:02 -0400 Subject: asyncio: Add set_protocol / get_protocol methods to Transports --- Lib/asyncio/sslproto.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/asyncio/sslproto.py') diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index 33d5de2db0..afe85a1438 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -305,6 +305,12 @@ class _SSLProtocolTransport(transports._FlowControlMixin, """Get optional transport information.""" return self._ssl_protocol._get_extra_info(name, default) + def set_protocol(self, protocol): + self._app_protocol = protocol + + def get_protocol(self): + return self._app_protocol + def is_closing(self): return self._closed -- cgit v1.2.1