-
Notifications
You must be signed in to change notification settings - Fork 231
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
Add MSG_CONFIRM and MSG_DONTROUTE to RecvFlags #499
Conversation
We're trying to provide a cross platform API, but for Windows |
Looks like the build is failing due to missing fields for some targets. Shall I limit the new functions to |
It's it's Linux only then yes. But it will require the |
Should be supported on Android as well. Is dc71380 what you mean by requiring both the |
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.
Is there a way we can get tests for this? I know the code is fairly trivial, but would be nice to know it works.
Otherwise the code LGTM, minus some small docs nits.
I think Should I add the flags to the impl I can add a test that the value is false under normal circumstances here: https://github.com/rust-lang/socket2/blob/master/tests/socket.rs#L685-L686 |
1f8679d
to
5c60e48
Compare
Yes to both. After that we can merge. |
Already done :) |
Thanks @pd0wm |
Thanks for your quick feedback! |
This is useful when reading from SocketCAN sockets. The MSG_CONFIRM flag is used to indicate a successful transmission of a CAN frame.
Reference: https://www.kernel.org/doc/html/next/networking/can.html#raw-socket-option-can-raw-join-filters
Is there any reason the raw flags value is not exposed to the user? There might be more drivers that are using non-standard flags to communicate a certain state.