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

Request new method peer_addr for tokio::net::UdpSocket #3312

Closed
PragmaTwice opened this issue Dec 22, 2020 · 1 comment · Fixed by #4362
Closed

Request new method peer_addr for tokio::net::UdpSocket #3312

PragmaTwice opened this issue Dec 22, 2020 · 1 comment · Fixed by #4362
Assignees
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net

Comments

@PragmaTwice
Copy link

Is your feature request related to a problem? Please describe.
As in the question #3309, I want to obtain peer_addr in tokio::net::UdpSocket, as std::net::UdpSocket::peer_addr.

Describe the solution you'd like
Provided by @Darksonn in Discord, implement it for mio::net::UdpSocket, then forward it to tokio::net::UdpSocket.

Describe alternatives you've considered
Provided by @Darksonn in Discord, downgrade to RawFd and retrieve peer_addr, which is a workaround.

@PragmaTwice PragmaTwice added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Dec 22, 2020
@Darksonn Darksonn added the M-net Module: tokio/net label Dec 22, 2020
@carlosb1
Copy link
Contributor

carlosb1 commented Jan 8, 2021

I did a proposal , but it is necessary update mio to 0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants