Closed aa7316a9-f344-4eca-8c1e-8f9977915087 closed 15 years ago
The following tar.bz2 contains a feature enhancement proposal for the socket module to create wrappings of the recvmsg and sendmsg primitives. These are sometimes useful, especially when dealing with ancillary messages, such as communicating the process, user and group id of a remote process to a server for proper identification.
These functions have so far been available in a separate module (python-eunuchs from the twisted project), but as they are standard POSIX and have been available on *BSD, AIX, Linux and several other OSs for some time they should be integrated into the core socket module.
The attached file contains patches for configure.in the socket module, socket.py and pyconfig.h.in. I've yet to write a test-suite, and the documentation could use some reworking.
That's really great, it's a shame this patch didn't get much interest. Do you feel like adding test to this, it would probably psuh for its inclusion ?
Bump. This functionality seems to be needed if anyone is going to be messing around with advanced features of IPv6. As it stands, the socket module in Python 2.6/3.0 is incomplete without this.
Just a followup comment to note that adding support for sendmsg()/recvmsg() is what you need to do "file descriptor passing" between processes on Unix---another technique for writing network servers.
The patch doesn't apply cleanly to the current trunk (which is understandable, given the patch is from 2005). Also, some tests would be welcome as Thomas said. And bonus points for documentation :)
Closing this as duplicate of bpo-6560.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at =
created_at =
labels = ['extension-modules', 'type-feature']
title = 'sendmsg() and recvmsg() for C socket module'
updated_at =
user = 'https://bugs.python.org/hwundram'
```
bugs.python.org fields:
```python
activity =
actor = 'ezio.melotti'
assignee = 'none'
closed = True
closed_date =
closer = 'ezio.melotti'
components = ['Extension Modules']
creation =
creator = 'hwundram'
dependencies = []
files = ['6639']
hgrepos = []
issue_num = 1194378
keywords = ['patch']
message_count = 6.0
messages = ['48287', '48288', '78264', '78358', '78369', '90973']
nosy_count = 8.0
nosy_names = ['beazley', 'pitrou', 'therve', 'forest', 'giampaolo.rodola', 'hwundram', 'ezio.melotti', 'gdesmott']
pr_nums = []
priority = 'low'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1194378'
versions = ['Python 3.1', 'Python 2.7']
```