This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, cks
Date 2013-07-07.00:01:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373155261.96.0.627057575607.issue18391@psf.upfronthosting.co.za>
In-reply-to
Content
Unfortunately it's not as easy as you may think. BSD sockets have no portable API to retrieve domain, type and protocol from a file descriptor. getsockopt() may be able to retrieve some or even all values but it's not portable. For example SO_DOMAIN and SO_PROTOCOL requires Linux 2.6.32 or newer. I'm not sure about BSD or Windows.

It's also not possible to verify the parameters until you actually do an operation like send(), recv() or accept() on a fd. Wrong parameters may not raise an error after all.

For now I suggest that you pass all information to the other process, that is fd, domain, type, proto. They are just integers.
History
Date User Action Args
2013-07-07 00:01:02christian.heimessetrecipients: + christian.heimes, cks
2013-07-07 00:01:01christian.heimessetmessageid: <1373155261.96.0.627057575607.issue18391@psf.upfronthosting.co.za>
2013-07-07 00:01:01christian.heimeslinkissue18391 messages
2013-07-07 00:01:01christian.heimescreate