STINNER Victor added the comment:
- I've learned that MSG_WAITALL may be unreliable on certain systems, so any
implementation of recvall depending on MSG_WAITALL may inexplicably fail on
such systems
Something else occurred since 5 years: the PEP 475 was accepted, it makes
Python more
Changes by Jean-Paul Calderone jean-p...@hybridcluster.com:
--
nosy: -exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
___
Antoine Pitrou added the comment:
I'm frankly not sure why this is useful. If you want a guaranteed read size you
should use the buffered layer - i.e. socket.makefile(). No need to complicate
the raw socket implementation.
--
nosy: +pitrou
___
STINNER Victor added the comment:
The patch uses the flag MSG_WAITALL for recv() if available. Extract of the
manual page:
MSG_WAITALL (since Linux 2.2)
This flag requests that the operation block until the full
request is satisfied. However, the
Irmen de Jong added the comment:
I created the patch about 5 years ago and in the meantime a few things have
happened:
- I've not touched C for a very long time now
- I've learned that MSG_WAITALL may be unreliable on certain systems, so any
implementation of recvall depending on MSG_WAITALL
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
___
Python-bugs-list
Changes by A.M. Kuchling a...@amk.ca:
--
nosy: -akuchling
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
___
Python-bugs-list mailing
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
___
Mark Lawrence breamore...@yahoo.co.uk added the comment:
@Irmen if you do proceed with this it should be against the py3k trunk.
--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7
___
Python tracker rep...@bugs.python.org
Irmen de Jong ir...@razorvine.net added the comment:
Ok I think I've got the code and doc changes ready. I added a recvall and a
recvall_into method to the socket module. Any partially received data in case
of errors is returned to the application as part of the args for a new
exception,
Changes by Irmen de Jong ir...@razorvine.net:
Removed file: http://bugs.python.org/file6439/patch.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
Changes by Irmen de Jong ir...@razorvine.net:
Added file: http://bugs.python.org/file16762/socketmodulepatch.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
Changes by Irmen de Jong ir...@razorvine.net:
Added file: http://bugs.python.org/file16763/libpatch.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
Changes by Irmen de Jong ir...@razorvine.net:
Added file: http://bugs.python.org/file16764/docpatch.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
Jean-Paul Calderone exar...@divmod.com added the comment:
Just a couple comments:
* If MSG_WAITALL is defined and a signal interrupts recv, will a string
shorter than requested will be returned by sock_recvall?
* Since MSG_WAITALL is already exposed to Python (when the underlying
platform
Irmen de Jong ir...@razorvine.net added the comment:
Currently if MSG_WAITALL is defined, recvall() just calls recv() internally
with the extra flag. Maybe that isn't the smartest thing to do because it
duplicates recv's behavior on errors. Which is: release the data and raise an
error.
Would
Irmen de Jong ir...@users.sourceforge.net added the comment:
Sure, I'll give it another go.
I've not done any c-development for quite a while though, so I have to pick up
the pieces and see how far I can get. Also, I don't have any compiler for
Windows so maybe I'll need someone else to
Irmen de Jong ir...@razorvine.net added the comment:
Ok I've looked at it again and think I can build an acceptable patch this time.
However there are 2 things that I'm not sure of:
1) how to return the partial data to the application if the recv() loop fails
before completion. Because the
Changes by Daniel Diniz aja...@gmail.com:
--
stage: - test needed
type: - feature request
versions: +Python 2.7 -Python 2.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
19 matches
Mail list logo