Author geertj
Recipients Ben.Darnell, alex, chatgris, christian.heimes, dstufft, ezio.melotti, geertj, giampaolo.rodola, gvanrossum, janssen, pitrou, python-dev, sbt, vstinner, yselivanov
Date 2014-10-05.21:24:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412544246.62.0.232029739145.issue21965@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-10-05 21:24:06geertjsetrecipients: + geertj, gvanrossum, janssen, pitrou, vstinner, giampaolo.rodola, christian.heimes, ezio.melotti, alex, python-dev, sbt, Ben.Darnell, yselivanov, dstufft, chatgris
2014-10-05 21:24:06geertjsetmessageid: <1412544246.62.0.232029739145.issue21965@psf.upfronthosting.co.za>
2014-10-05 21:24:06geertjlinkissue21965 messages
2014-10-05 21:24:06geertjcreate