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

udp: Add reuse_address and reuse_port options #146

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

kgraefe
Copy link
Contributor

@kgraefe kgraefe commented Mar 17, 2023

This change requires all UDP sockets (not just multicast sockets) to be created by socket2::Socket as mio::net::UdpSocket does not provide the set_reuse_address and set_reuse_port functions.

@kgraefe
Copy link
Contributor Author

kgraefe commented Mar 17, 2023

Sorry for spamming PRs ;-) it's just that I converted the adjustments I had hard-coded in my local fork onto the new API.

@kgraefe kgraefe force-pushed the udp-reuse-addr-and-port branch 2 times, most recently from dea352b to cb5c6a7 Compare March 20, 2023 10:55
@kgraefe kgraefe changed the title udp: listen: Add reuse_address and reuse_port options udp: Add reuse_address and reuse_port options Mar 20, 2023
Copy link
Owner

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

Two comments, but I really like how the new implementation looks! 🚀

src/adapters/udp.rs Outdated Show resolved Hide resolved
src/adapters/udp.rs Outdated Show resolved Hide resolved
This change requires all UDP sockets (not just multicast sockets) to be
created by socket2::Socket as mio::net::UdpSocket does not provide the
set_reuse_address and set_reuse_port functions.

Signed-off-by: Konrad Gräfe <[email protected]>
@kgraefe kgraefe force-pushed the udp-reuse-addr-and-port branch from cb5c6a7 to 957d02a Compare March 21, 2023 13:19
@kgraefe kgraefe marked this pull request as draft March 21, 2023 13:19
@kgraefe kgraefe marked this pull request as ready for review March 21, 2023 14:59
@kgraefe kgraefe requested a review from lemunozm March 21, 2023 14:59
Copy link
Owner

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

Thanks for this second iteration. Very neat PRs!

@lemunozm lemunozm merged commit ec5c4a0 into lemunozm:master Mar 22, 2023
@lemunozm lemunozm mentioned this pull request Mar 22, 2023
3 tasks
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.

2 participants