продолжаем вносить все

This commit is contained in:
Alexey Kasyanchuk 2016-12-31 06:32:56 +03:00
parent a1330db184
commit d8928b8eb4
7 changed files with 16 additions and 0 deletions

16
index.js Normal file
View File

@ -0,0 +1,16 @@
const client = new (require('./lib/client'))
const spider = new (require('./lib/spider'))(client)
//spider.on('unensureHash', (hash)=> console.log(hash))
spider.on('ensureHash', (hash, addr)=> {
console.log('new hash');
})
client.on('complete', function (metadata, infoHash) {
console.log(metadata.info);
});
// spider.on('nodes', (nodes)=>console.log('foundNodes'))
spider.listen(4445)