Author giampaolo.rodola
Recipients asvetlov, giampaolo.rodola, pitrou, vstinner, yselivanov
Date 2017-11-08.13:40:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510148421.2.0.213398074469.issue31970@psf.upfronthosting.co.za>
In-reply-to
Content
>> I've a few ideas how to add 0-copy support to protocols.

> I'd be interesting to hear about them.  The main challenge IMHO is to find a way to allow a readinto()-like functionality.

Exposing sendfile() should be straightforward. I started implementing it years ago but I gave up pretty soon because asyncio had no solid test framework for testing an actual data transfer between two sockets and that basically represented a blocker. Basically back then all recv() / send() related tests were mocks. Not sure about the current situation but if that has changed I would be happy to contribute a PR (I was the one who contributed socket.sendfile()).

As for a readinto()-like functionality: the only thing I'm aware of is splice() syscall but it's Linux only. It must be noted that also sendfile() is UNIX only. Windows achieve the same via TransmitFile.
History
Date User Action Args
2017-11-08 13:40:21giampaolo.rodolasetrecipients: + giampaolo.rodola, pitrou, vstinner, asvetlov, yselivanov
2017-11-08 13:40:21giampaolo.rodolasetmessageid: <1510148421.2.0.213398074469.issue31970@psf.upfronthosting.co.za>
2017-11-08 13:40:21giampaolo.rodolalinkissue31970 messages
2017-11-08 13:40:21giampaolo.rodolacreate