-
Notifications
You must be signed in to change notification settings - Fork 151
feat(s2n-quic-dc): Add Unix domain socket sender/receiver #2842
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
744f00f to
71610de
Compare
06c24b4 to
8daebcb
Compare
|
Looks like as of #2848 we'll need someone from @aws/s2n-core to review as well, requested @maddeleine for now. |
| Ok(()) => { | ||
| return Ok(()); | ||
| } | ||
| Err(nix::Error::EAGAIN) => { |
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.
Aren't you also going to get partial sends that you might need to handle? I don't see where you're checking the number of bytes sent.
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 pretty sure datagram sockets are either 'send everything' or 'send nothing' - but it would be good to confirm and probably add an assertion that any returned size matches what we expected to send.
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.
Yeah that would make sense, although eh, confirming that is kind of a pain. I suppose if this is between two processes I'm not sure a partial send could even occur.
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.
This stack overflow answer seems to imply that yes, if you can't fully send with a datagram socket, you get an error instead of a partial send.
Release Summary:
Resolved issues:
n/a
Description of changes:
Creates a sender and receiver for Unix domain sockets. This handles a message along with a file descriptor as ancillary data. This functionality is required for reusing dcQUIC handshakes across application processes.
Call-outs:
Testing:
Added unit test.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.