Message269196
Thank you for the excellent review Martin. I'm attaching a new patch which I think addresses your points. I created it from hg, maybe that works nicer.
I've added constants for SO_DOMAIN, SO_PROTOCOL, SO_PASSCRED, SO_PEERSEC, and SO_PASSEC.
Using SO_PROTOCOL to get the protocol value seems to work fine on Linux.
I've dropped the union as you suggest. I think the docs have been fixed.
I would be okay with making fdtype() a non-public function. It seems possibly useful though.
Regarding the name, currently I think fromfd2 is best. It really does what fromfd() should have done if SO_TYPE/SO_PROTOCOL was available and portable.
Extending fromfd() seems a bad idea. I don't want dup() and it seems better that application code can use hasattr() to test for new functionality. You can work around not having fromfd2() by using getsockname() and then using some ugly text matching to work out what kind of socket you have. |
|
Date |
User |
Action |
Args |
2016-06-24 17:17:11 | nascheme | set | recipients:
+ nascheme, SilentGhost, martin.panter |
2016-06-24 17:17:11 | nascheme | set | messageid: <1466788631.48.0.620909577176.issue27377@psf.upfronthosting.co.za> |
2016-06-24 17:17:11 | nascheme | link | issue27377 messages |
2016-06-24 17:17:11 | nascheme | create | |
|