Issue 17416 - SocketOption.REUSEPORT not available on linux
Summary: SocketOption.REUSEPORT not available on linux
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All Linux
: P4 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2017-05-21 22:21 UTC by Kevin
Modified: 2024-11-04 04:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kevin 2017-05-21 22:21:09 UTC
core.sys.posix.sys.socket is missing the SO_REUSEPORT option for linux.

# uname -r
2.6.32-43-pve

From my linux system headers:
/usr/include/asm-generic/socket.h:#define SO_REUSEPORT  15

as well, the SocketOption.REUSEPORT enumeration does not exist in std.socket
Comment 1 Dlang Bot 2022-02-20 19:08:07 UTC
@Geod24 created dlang/phobos pull request #8389 "Fix 17416 - Add REUSEPORT to std.socket" fixing this issue:

- Fix 17416 - Add REUSEPORT to std.socket
  
  The issue also mentions the Druntime bindings, which have been added a few years ago,
  however this was missing from std.socket. This implementation provides SO_REUSEPORT on
  Windows as well, despite it being equivalent to SO_REUSEADDR, to simplify client code.

https://github.com/dlang/phobos/pull/8389
Comment 2 Dlang Bot 2024-11-04 03:30:25 UTC
@0xEAB updated dlang/phobos pull request #9082 "Fix 17416 - Add REUSEPORT to std.socket" fixing this issue:

- Fix Bugzilla Issue 17416 - Add REUSEPORT to std.socket
  
  The issue also mentions the Druntime bindings, which have been added a few years ago,
  however this was missing from std.socket. This implementation provides SO_REUSEPORT on
  Windows as well, despite it being equivalent to SO_REUSEADDR, to simplify client code.
  
  Co-authored-by: Elias Batek <desisma@heidel.beer>

https://github.com/dlang/phobos/pull/9082
Comment 3 Dlang Bot 2024-11-04 04:09:54 UTC
dlang/phobos pull request #9082 "Fix 17416 - Add REUSEPORT to std.socket" was merged into master:

- 89550d9e7ac387ffc2b30bdc7c517c18b93599e4 by Geod24:
  Fix Bugzilla Issue 17416 - Add REUSEPORT to std.socket
  
  The issue also mentions the Druntime bindings, which have been added a few years ago,
  however this was missing from std.socket. This implementation provides SO_REUSEPORT on
  Windows as well, despite it being equivalent to SO_REUSEADDR, to simplify client code.
  
  Co-authored-by: Elias Batek <desisma@heidel.beer>

https://github.com/dlang/phobos/pull/9082