[issue17552] socket.sendfile()

2013-03-26 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': This is based on progress made in issue 13564 and aims to provide a new sendfile() method for the socket class taking advantage of high-performance "zero-copy" os.sendfile() available on most POSIX platforms. A wrapper on top of os.sendfile() appears to be

[issue17552] socket.sendfile()

2013-03-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: A couple of comments: - I don't understand the point of the second member in the tuple - the timeout logic should be fixed so that the total operation time doesn't exceed the timeout, rather than each iteration (in other words, a deadline should be computed at

[issue17552] socket.sendfile()

2013-03-26 Thread Charles-François Natali
Charles-François Natali added the comment: - I don't understand the "running out of FDs" thing. select() is limited to FDs less than FD_SETSIZE, but I don't see how you could get EMFILE (select() will return a ValueError) - is there any platform with sendfile() which doesn't support poll()? -

[issue17552] socket.sendfile()

2013-03-26 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue17552] socket.sendfile()

2013-03-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > I don't understand the point of the second member in the tuple The 'exception' member can be useful to know the reason why sendfile() failed and send() was used as fallback. > the timeout logic should be fixed so that the total operation > time doesn't e

[issue17552] socket.sendfile()

2013-03-27 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17552] socket.sendfile()

2013-04-07 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue17552] socket.sendfile()

2013-04-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- title: create_server -> socket.sendfile() ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue17552] socket.sendfile()

2013-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New patch in attachment includes a new 'offset' parameter, new tests and also update file offset on return or in case of error so that file.tell() can be used to tell how many bytes were transmitted at any time. This way we'll avoid using a custom exception.

[issue17552] socket.sendfile()

2013-04-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file29733/socket-sendfile2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue17552] socket.sendfile()

2013-04-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file29733/socket-sendfile2.patch ___ Python tracker ___ ___ Python-bugs-li

[issue17552] socket.sendfile()

2013-04-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file29734/socket-sendfile2.patch ___ Python tracker ___ ___ Python-bugs-list