leprosus/golang-p2p

Get IP from within handler

Opened this issue · 2 comments

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.

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

"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