holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.04k stars 84 forks source link

how to get peer.details for current instance? #20

Closed whatsdis closed 5 years ago

whatsdis commented 5 years ago

Is there any way to discover the running instance's ip and port? I would like to store this for future access...for instance in order to ping the address to see if it's connectable or not.

Does this make sense? I'm able to get other peers's ip and port from network().on('connection') but not the running instance's details.

Also it'd be great if you could just "ping" a peer's ip and port to see if they are still alive.