Antoine Pitrou added the comment: Le 05/10/2014 23:24, Geert Jansen a écrit : > > Yes, it could be done quite easily. SslPipe has no dependency on > other parts of Gruvi and if this is for Python 3.5 only then you don't need sslcompat either.
Yes, it works. Note that I had to modify SSLPipe to also notify of handshake failures (by passing an argument to the handshake callback). Here is draft diff against asyncio: https://gist.github.com/pitrou/f04fa9cbfec88cc37050 However, I don't think this the right approach actually. Rather, the SSL layer should be implemented as a Protocol object that's also able to act as a transport for the actual application-level Protocol. It would completely decouple it from the transport and event loop implementation details. (I think that's how Twisted does it, btw) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21965> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com