David Watson <bai...@users.sourceforge.net> added the comment:

Hi, I'm afraid there may have been some duplication of effort
here - I set about reworking Heiko Wundram's original patch
(issue #1194378) without knowing about this one.  I don't have
unit tests yet either, but I saw this and thought I'd better post
what I had.  It includes the items on Kalman's to-do list.

This patch is based on Heiko's original code, but changes the
interface, dropping the special processing of SCM_RIGHTS, etc. (I
think the encoding/decoding would be better handled with separate
functions/classes), and adds source address (msg_name) support
and scatter/gather I/O via sendmsg() and a new recvmsg_into()
method, as well as fixing various bugs and limitations.

Comments/flames welcome too.  You'll see a few XXX comments in
the code.  One in particular refers to the msg_name value from
recvmsg() on a connected socket; I've said in the docstring that
it is "unspecified" in this case, but it might or might not
contain a valid address, depending on the OS.  These methods may
also need to be conditionally compiled if, say, CMSG_SPACE (or
sendmsg/recvmsg?) isn't available somewhere.

I didn't add a facility to receive into only part of a buffer in
recvmsg_into(), like the one in recv_into(), since memoryview
objects make it redundant AFAICT.

----------
nosy: +baikie
Added file: http://bugs.python.org/file15561/baikie-hwundram.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6560>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to