feat(search): add remote torrents in db via dht and search requests

This commit is contained in:
Alexey Kasyanchuk
2018-07-28 14:56:46 +03:00
parent b48ac7f973
commit c6bef2f94a
4 changed files with 77 additions and 7 deletions

View File

@ -47,6 +47,13 @@ class Client extends Emiter
debug('start download', infohash.toString('hex'), 'connections', this.activeConnections);
this.activeConnections++;
// move host -> address
if(rinfo.host)
{
rinfo = Object.assign({}, rinfo)
rinfo.address = rinfo.host
delete rinfo.host
}
var successful = false;
var socket = new net.Socket();