-
Notifications
You must be signed in to change notification settings - Fork 2
Make it possible to construct a TcpListener from an OwnedFd #3
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
base: main
Are you sure you want to change the base?
Conversation
| #[derive(thiserror::Error, Debug)] | ||
| pub enum Error { | ||
| #[error("error taking ownership of a socket from a file descriptor: {0}")] | ||
| SocketFromFd(std::io::Error), |
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.
Note: this is a breaking change.
ikatson
left a comment
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.
Please address the comment otherwise lgtm
| SocketAddr::V4(addr) => SocketAddrKind::V4(addr), | ||
| SocketAddr::V6(addr) => SocketAddrKind::V6 { | ||
| addr, | ||
| is_dualstack: addr.ip().is_unspecified() |
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.
Might need to check the flag V6_V6ONLY (don't remember the exact name)
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.
next line
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.
Gah. Except that line is incorrect. Fixing...
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.
Ok, fixed. I'm not sure how I managed to do that (the tests were correct, at least...).
593482a to
1271f09
Compare
|
Hey this doesn't compile on Mac, please address, can't merge otherwise |
This will make it possible to implement systemd socket activation in rqbit [1]. This is restricted to Linux because MacOS is missing some getsockopt features needed by `Socket::protocol` and `Socket::is_listener`. [1] ikatson/rqbit#505
1271f09 to
b056f2d
Compare
|
I've restricted this change to Linux only. It appears that MacOS is missing a few features and it's not like we need it on MacOS anyways. I've also enabled CI in my fork now. It passes on Windows and Linux, but I'm still seeing (unrelated) failures in the multicast tests: |
This will make it possible to implement systemd socket activation in rqbit (ikatson/rqbit#505).