Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

proposal: x/net/quic: add LocalAddr and RemoteAddr to quic.Conn #70138

Closed
jfgiorgi opened this issue Oct 31, 2024 · 4 comments
Closed

proposal: x/net/quic: add LocalAddr and RemoteAddr to quic.Conn #70138

jfgiorgi opened this issue Oct 31, 2024 · 4 comments
Labels
Milestone

Comments

@jfgiorgi
Copy link

Proposal Details

LocalAddr() and RemoteAddr() are missing from quic.Conn (to be on par with net.Conn).

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/623157 mentions this issue: quic: add LocalAddr() and RemoteAddr() to quic.Conn

@ianlancetaylor
Copy link
Member

CC @neild

@neild
Copy link
Contributor

neild commented Nov 1, 2024

I think this can be considered a continuation of #58547 rather than go through the official proposal process. #58547 was accepted with the understanding that the package API would evolve over the course of implementation.

Adding LocalAddr and RemoteAddr to quic.Conn seems reasonable--this is information that's useful to have, and we currently don't have any way to report the remote address for connections we accept.

The comparison to net.Conn isn't a good one, though: A net.Conn is a stream-oriented connection, and a quic.Conn multiplexes many streams. They aren't the same thing, and quic.Conn will never implement net.Conn.

@jfgiorgi
Copy link
Author

jfgiorgi commented Nov 4, 2024

The intention was not to implement the net.Conn interface. Just to get the remote / local addresses/ports like net.Conn have.

@jfgiorgi jfgiorgi changed the title proposal: x/net/quic: add LocalAddr() and RemoteAddr() to quic.Conn proposal: x/net/quic: add LocalAddr and RemoteAddr to quic.Conn Nov 6, 2024
btwiuse pushed a commit to webtransport/quic that referenced this issue Dec 10, 2024
btwiuse pushed a commit to webtransport/quic that referenced this issue Dec 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants