Add Unix.SO_REUSEPORT#9869
Conversation
xavierleroy
left a comment
There was a problem hiding this comment.
Thanks for this code, I guess it's time to support SO_REUSEPORT.
I'm afraid the file otherlibs/win32/sockopt.c needs updating, symmetrically with otherlibs/unix/sockopt.c.
|
Why are there fewer |
Probably because some of the socket options are guaranteed to be defined by Winsock2, while we weren't sure that every Unix-like system out there has those options. |
xavierleroy
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks!
| SO_DEBUG | ||
| | SO_BROADCAST | ||
| | SO_REUSEADDR | ||
| | SO_REUSEPORT |
There was a problem hiding this comment.
I know that no one should rely on the order of constructors, but shouldn’t this have been added at the end of the type? (and given that we haven’t frozen 4.12, should we move it)
Given the ease with which the wrong stubs can be loaded on bytecode, it doesn’t seem great to have versions of the C stubs which interpret the same numeric constant differently?
There was a problem hiding this comment.
It could be prudent to move the new constructor last. However, many other things can go wrong if the wrong stub library is dynamically loaded, so this could just as well make no difference in safety.
Resolve #3512