Skip to content

Add nc.LocalAddr, similar to nc.ConnectedAddr #1877

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

alexbozhenko
Copy link
Contributor

Currently, the Go client library exposes the remote address of the underlying net.Conn.
It would be helpful if it also exposed the LocalAddr.
The usecase is to help determine which network was used to reach the remote NATS server.

@coveralls
Copy link

Coverage Status

coverage: 84.757% (+0.05%) from 84.703%
when pulling 2ea3acc on alexbozhenko:expose_local_addr
into 70300b2 on nats-io:main.

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wallyqs wallyqs merged commit abad5e6 into nats-io:main May 28, 2025
4 checks passed
@piotrpio piotrpio mentioned this pull request Jun 3, 2025
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.

3 participants