Author giampaolo.rodola
Recipients anacrolix, giampaolo.rodola, loewis, pitrou, rosslagerwall
Date 2011-02-09.17:18:26
SpamBayes Score 3.8895e-08
Marked as misclassified No
Message-id <>
On a second thought I have two complaints.

There is no reason to return the file offset, also because this is only supported on Linux. On all other platforms we are calculating the file offset by making a sum of offset + number of bytes sent. Despite this would normally work it no longer makes sense when headers/trailers arguments are specified.

>>> sendfile(in, out, offset, 4096, headers=[b"xxxx"])
(5000, 5000)

In this case the right offset is supposed to be 4096.
We might adjust this in the code but in my opinion knowing the file offset is not really necessary as what the user really needs is the number of bytes sent, as when using socket.send().

My second complaint is about headers/trailers data type.
Currently we are passing a sequence of buffers (tipically a list) but I think we should pass plain bytes instead.
Date User Action Args
2011-02-09 17:18:27giampaolo.rodolasetrecipients: + giampaolo.rodola, loewis, pitrou, anacrolix, rosslagerwall
2011-02-09 17:18:27giampaolo.rodolasetmessageid: <>
2011-02-09 17:18:26giampaolo.rodolalinkissue10882 messages
2011-02-09 17:18:26giampaolo.rodolacreate