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

Get IP from within handler #1

Open
unitink72 opened this issue Sep 16, 2022 · 2 comments
Open

Get IP from within handler #1

unitink72 opened this issue Sep 16, 2022 · 2 comments

Comments

@unitink72
Copy link

Is there a way to find out the IP of the other end from within a connection handler? I'm a new to GO but not seeing how this is possible as-is.

@leprosus
Copy link
Owner

leprosus commented Oct 1, 2022

golang-p2p has not the functionality.
But I am working under the next major version and I am about to add it

@devicemxl
Copy link

"Is there a way to find out the IP of the other end from within a connection handler? I'm a new to GO but not seeing how this is possible as-is."

I don't know if you discover how, but I think you could be:

  1. (local) Network discovery to identify active IP addresses
  2. For each active IP address, send a request to the endpoint
  3. Wait for the response to determine if the platform is installed

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

No branches or pull requests

3 participants