Exemple #1
0
        dht.lookup(hash, function() {

            console.log('Lookup finished. Announcing peer with hash ' + hash)
            dht.announce(hash, port, function(error){
                console.log('Announced: ' + hash + ' on port ' + port + ', error: ' + error);
            });
        });
Exemple #2
0
	dht.lookup(infohashReceived, function(){
		// Do the announce right after the lookup
		dht.announce(infohashReceived, 55555, null)
		console.log('FIRST ANNOUNCE PERFORMED')
		
		setInterval(function(){
			dht.announce(infohashReceived, 55555, null)
			console.log('ANNOUNCE PERFORMED')
		}, announceInterval)
	})
Exemple #3
0
		setInterval(function(){
			dht.announce(infohashReceived, 55555, null)
			console.log('ANNOUNCE PERFORMED')
		}, announceInterval)