Add MSG_CONFIRM and MSG_DONTROUTE to RecvFlags#499
Add MSG_CONFIRM and MSG_DONTROUTE to RecvFlags#499Thomasdezeeuw merged 1 commit intorust-lang:masterfrom
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 |
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
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.