Skip to content
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

feat(s2n-quic-dc): add socket constructor #2240

Merged
merged 2 commits into from
Jun 11, 2024
Merged

feat(s2n-quic-dc): add socket constructor #2240

merged 2 commits into from
Jun 11, 2024

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Jun 11, 2024

Description of changes:

This change adds a mechanism to easily construct UDP and TCP sockets with a socket::Options struct. I've also included an in-memory BPF assembler, which enables creating pairs of UDP sockets and route packets between them.

Testing:

Several tests were added as part of these changes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft force-pushed the camshaft/cbpf branch 2 times, most recently from 8de3cab to bd45859 Compare June 11, 2024 04:05
@camshaft camshaft marked this pull request as ready for review June 11, 2024 04:47
@camshaft camshaft force-pushed the camshaft/cbpf branch 2 times, most recently from 187ece8 to 3926e68 Compare June 11, 2024 16:39
// have the OS select a random port for us
options.addr.set_port(0);
// don't reuse the ports since we don't have a consistent way to route packets
options.reuse_port = Default::default();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: It's a little more readable to me if you say options.reuse_port = ReusePort::Disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

@camshaft camshaft enabled auto-merge (squash) June 11, 2024 22:47
@camshaft camshaft merged commit ab6337c into main Jun 11, 2024
129 of 130 checks passed
@camshaft camshaft deleted the camshaft/cbpf branch June 11, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants