-
Notifications
You must be signed in to change notification settings - Fork 228
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
Initial basic cmsg support for unix #316
base: master
Are you sure you want to change the base?
Conversation
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'm afraid this doesn't work at all on a number of platform, please see the CI failure. I'll do another round of review once those are fixed.
use std::iter::FromIterator; | ||
|
||
#[derive(Debug, Clone)] | ||
struct MsgHdrWalker<B> { |
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.
Let's remove the generic parameter, we only need &[u8]
, same for the other structures.
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.
Tentatively keeping this parameter so we can reuse some logic between &[u8]
and &mut [u8]
, but removed all the type parameters from the public API for now.
Thank you for looking, I'm working through the other platform problems here and I'll push as soon as I have things working so you can look through. |
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.
Not a complete review, but a start.
- Split recv_msg from recv_msg_from. - Introduce CmsgBuffer type.
Looking at this failure:
Looks unrelated to this change? The macOS failure looks real though:
|
Also added
set_recv_ttl
while I'm here to use in testing. The otherRECVxxx
-type socket options might make more sense with control message support now.I went back and forth on the shape of the public API for this quite a bit, and I also don't have access to a Windows machine to check.
Fixes #313