-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Add peer_addr function to UdpSocket #59104
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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) toUdpSocket, this would work exactly the same as TcpStream (getpeername) and return the address that was previously passed toconnect.I'd be happy to try and take a stab at this! 🚀