[Patches] [ python-Patches-1103213 ] Adding the missing
socket.recvall() method
SourceForge.net
noreply at sourceforge.net
Sun Jan 16 05:02:31 CET 2005
Patches item #1103213, was opened at 2005-01-16 05:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1103213&group_id=5470
Category: Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Irmen de Jong (irmen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Adding the missing socket.recvall() method
Initial Comment:
This patch is a first take at adding a recvall method
to the socket object, to mirror the existence of the
sendall method.
If the MSG_WAITALL flag is available, the recvall
method just calls recv() with that flag.
If it is not available, it uses an internal loop
(during the loop, threads are allowed, so this improves
concurrency).
Having this method makes Python code much simpler;
before you had to test for MSG_WAITALL yourself and
write your own loop in Python if the flag is not there
(on Windows for instance).
(also, having the loop in C improves performance and
concurrency compared to the same loop in Python)
Note: the patch hasn't been tested very well yet.
(code is based on a separate extension module found
here: http://www.it-ernst.de/python/ )
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1103213&group_id=5470
More information about the Patches
mailing list