Message183827
| Author |
giampaolo.rodola |
| Recipients |
eric.araujo, giampaolo.rodola, pitrou, rosslagerwall |
| Date |
2013年03月09日.16:08:47 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1362845328.59.0.808069412391.issue13564@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I don't understand why you must put the socket in
> non-blocking mode for sendfile().
I did that mainly because I'm using select() / poll() and it seems kind of "natural" to set the socket in non-blocking mode (proftpd does the same).
I'm not sure whether it actually makes any difference though (on Linux it works either way, blocking or not).
I'm removing the non-blocking mode in the new attached patch. We can take take a look at the buildbots later and see how they behave.
> Also I think the support code (_use_send() / _use_sendfile()) should be factored out somewhere.
Agreed and turned them into methods.
> There could even be a socket.sendfile() method with the appropriate fallbacks?
Perhaps. The only thing which is not clear is how to deal with blocking vs. non-blocking sockets.
Also, Windows should also be covered and expose TransmitFile.
It's probably better to discuss this elsewhere. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年03月09日 16:08:49 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, pitrou, eric.araujo, rosslagerwall |
| 2013年03月09日 16:08:48 | giampaolo.rodola | set | messageid: <1362845328.59.0.808069412391.issue13564@psf.upfronthosting.co.za> |
| 2013年03月09日 16:08:48 | giampaolo.rodola | link | issue13564 messages |
| 2013年03月09日 16:08:47 | giampaolo.rodola | create |
|