0.12.2 • Published 6 years ago
peer-wire-swarm v0.12.2
peer-wire-swarm
Swarm implementation for Bittorrent
npm install peer-wire-swarm
Usage
var wireSwarm = require('peer-wire-swarm');
var swarm = wireSwarm(myInfoHash, myPeerId);
swarm.on('wire', function(wire) {
// a relevant peer-wire-protocol as appeared
// see the peer-wire-protocol module for more info
wire.on('unchoke', function() {
// we are now unchoked
});
swarm.wires // <- list of all connected wires
});
swarm.add('127.0.0.1:42442'); // add a peer
swarm.remove('127.0.0.1:42244'); // remove a peer
swarm.pause(); // pause the swarm (stops adding connections)
swarm.resume(); // resume the swarms
swarm.listen(6881); // listen for incoming connections (optional)
License
MIT
0.12.2
6 years ago
0.12.1
9 years ago
0.12.0
9 years ago
0.11.0
9 years ago
0.10.0
9 years ago
0.9.2
10 years ago
0.9.1
10 years ago
0.9.0
10 years ago
0.8.0
10 years ago
0.7.2
10 years ago
0.7.1
10 years ago
0.7.0
10 years ago
0.6.1
10 years ago
0.6.0
10 years ago
0.5.2
10 years ago
0.5.1
10 years ago
0.5.0
10 years ago
0.4.2
10 years ago
0.0.9
10 years ago
0.4.1
11 years ago
0.3.0
11 years ago
0.2.2
11 years ago
0.2.1
11 years ago
0.2.0
11 years ago
0.1.0
11 years ago
0.0.8
11 years ago
0.0.7
11 years ago