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

net: UDP socket gets local_addr, read_fixed and write_fixed #189

Merged
merged 3 commits into from
Dec 3, 2022

Conversation

FrankReh
Copy link
Collaborator

@FrankReh FrankReh commented Nov 30, 2022

The type UdpSocket gets methods local_addr, read_fixed and write_fixed.

local_addr is useful when binding the socket to 127.0.0.1:0 to be able to report what port the OS assigned.

The read_fixed and write_fixed are useful, like read and write, when the UDP socket has been connected to an address.

@FrankReh FrankReh marked this pull request as ready for review November 30, 2022 14:50
@FrankReh
Copy link
Collaborator Author

FrankReh commented Dec 3, 2022

@Noah-Kennedy Can you review? The additions are innocuous. I'll do a separate sweep of all the code and change functions to use the socket2::SockRef::from call in a separate PR.

@FrankReh FrankReh merged commit 002c94f into tokio-rs:master Dec 3, 2022
@FrankReh FrankReh deleted the frankreh/udp-local-and-fixed-buf branch December 3, 2022 22:04
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