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

Add peer_addr function to UdpSocket #59104

Closed
LinusU opened this issue Mar 11, 2019 · 0 comments
Closed

Add peer_addr function to UdpSocket #59104

LinusU opened this issue Mar 11, 2019 · 0 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@LinusU
Copy link
Contributor

LinusU commented Mar 11, 2019

Long background: https://users.rust-lang.org/t/query-wether-a-udpsocket-has-been-connect-ed/26076

I think it would be nice if we could add the peer_addr (from TcpStream & UnixStream) to UdpSocket, this would work exactly the same as TcpStream (getpeername) and return the address that was previously passed to connect.

I'd be happy to try and take a stab at this! 🚀

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 11, 2019
pietroalbini added a commit to pietroalbini/rust that referenced this issue Mar 13, 2019
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
kennytm added a commit to kennytm/rust that referenced this issue Mar 15, 2019
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
Centril added a commit to Centril/rust that referenced this issue Mar 16, 2019
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
sanxiyn added a commit to sanxiyn/rust that referenced this issue Mar 18, 2019
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
Centril added a commit to Centril/rust that referenced this issue Mar 19, 2019
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
Centril added a commit to Centril/rust that referenced this issue Mar 22, 2019
Add peer_addr function to UdpSocket

Fixes rust-lang#59104

This is my first pull request to Rust, so opening early for some feedback.

My biggest question is: where do I add tests?

Any comments very much appreciated!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants