-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
net: add reuse_address option to StreamServer #3820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
this uses a bad direct interface with std.os.linux, this should add setsockopt to std.os.
- net: use os.setsockopt()
- os: fix typos on setsockopt
this makes them consistent with the linux syscalls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't mind per-sock-opt wrappers e.g. pub fn setReuseAddr() !void
.
These probably belong on some sort of socket object though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API improvements look good 👍
I want to make sure the error set for std.os.setsockopt
is correct since it's a public part of std.os API, and then this is good to merge.
Landed in 86ba8c0, thanks! |
std.os.setsockopt
std.c
so their parameters align with the linux syscall parameters