Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesHow to list peers #223
Closed
How to list peers #223
Comments
This comment has been minimized.
This comment has been minimized.
|
You don't need to use the Try this instead: var WebTorrent = require('webtorrent')
var client = new WebTorrent({ maxPeers:10 })
var magnet_uri = "magnet:?xt=urn:btih:b415c913643e5ff49fe37d304bbb5e6e11ad5101&dn=ubuntu-14.10-desktop-amd64.iso"
client.download(magnet_uri, function (torrent) {
// print out ips of currently connected wires
torrent.swarm.wires.forEach(function (wire) {
console.log(wire.remoteAddress)
})
// print out ips of new wires the client connects to
torrent.swarm.on('wire', function (wire) {
console.log(wire.remoteAddress)
})
}) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to list 10 random peers from a torrent, but my code doesn't work. Can anyone help?