Geert Jansen added the comment:

Thanks Antoine for merge!

> SSLPipe looks interesting. I wonder if it can be used to reimplement 
> _SelectorSslTransport in asyncio.selector_events (at least as an experiment).

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.

Basically you want to install a read callback on the socket that, when fired, 
reads from the socket and stuffs the bytes into the memory BIO. It should then 
write() the returning data back to the socket. If there's a short write, then 
it should install a write callback to retry the write.

The above is almost identical to what SslTransport in Gruvi does. The only 
different is that Gruvi uses a proactor on all platforms, so that it does not 
need to call read() itself but the callback is already called with the buffer.

----------

_______________________________________
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

Reply via email to