We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, some friendly feedback about improving the docs for this module <3
It gives you the ip addresses of peers and holepunches to them? Meaning you get a stream to each peer?
Docs say
// emitted when a peer is found lookup.on('peer', console.log)
...but what's in a peer object? What can it do?
I think this is the answer? https://github.com/hyperswarm/discovery/blob/master/index.js#L389
topic.emit('peer', { port: a.data.port, host, local: true, referrer: null, topic: topic.key })
So a peer is mostly a port and hostname, not a stream.
holepunch
Docs just say:
d.holepunch(peer, cb) UDP holepunch to another peer.
What actually happens? What does the callback get?
Looking in the code, it just calls dht.holepunch. The docs for hyperswarm/dht just say
dht.holepunch
node.holepunch(peer, [callback]) UDP holepunch to another peer. peer should be a { host, port, referrer: { host, port } }, where referrer should be the host and port of the DHT node who told you about this peer.
node.holepunch(peer, [callback])
UDP holepunch to another peer.
peer should be a { host, port, referrer: { host, port } }, where referrer should be the host and port of the DHT node who told you about this peer.
Ok, so that's probably the peer object we were talking about earlier. But what does this do, and what's provided to the callback?
The word holepunch does not occur in any of the code in hyperswarm/dht so I can't find what it's actually doing.
hyperswarm/dht
The text was updated successfully, but these errors were encountered:
hi, there's a perfect explanation for you in this video about Hole Punching. https://youtu.be/1qzDiAg4VGk?t=674
Sorry, something went wrong.
No branches or pull requests
Hello, some friendly feedback about improving the docs for this module <3
What's the scope of this module?
It gives you the ip addresses of peers and holepunches to them? Meaning you get a stream to each peer?
What's a peer object?
Docs say
...but what's in a peer object? What can it do?
I think this is the answer?
https://github.com/hyperswarm/discovery/blob/master/index.js#L389
So a peer is mostly a port and hostname, not a stream.
What does
holepunch
do?Docs just say:
What actually happens? What does the callback get?
Looking in the code, it just calls
dht.holepunch
. The docs for hyperswarm/dht just sayOk, so that's probably the peer object we were talking about earlier. But what does this do, and what's provided to the callback?
The word
holepunch
does not occur in any of the code inhyperswarm/dht
so I can't find what it's actually doing.The text was updated successfully, but these errors were encountered: