Skip to content

update event from peer that is not in swarm node.js bittorrent tracker error #42

@parth1729

Description

@parth1729

As specified here i am installing it with node.js and then server.js implemented like bleow

var Server = require('bittorrent-tracker').Server

var server = new Server({
udp: true, // enable udp server? [default=true]
http: true // enable http server? [default=true]
})

server.on('error', function (err) {
// fatal server error!

console.log(err.message)
})

server.on('warning', function (err) {
// client sent bad data. probably not a problem, just a buggy client.
console.log(err.message)
})

server.on('listening', function (port) {
console.log('tracker server is now listening on ' + port)
})

// start tracker server listening!
server.listen(6882)

// listen for individual tracker messages from peers:

server.on('start', function (addr) {
console.log('got start message from ' + addr)
})

server.on('complete', function (addr) {})
server.on('update', function (addr) {})
server.on('stop', function (addr) {})

// get info hashes for all torrents in the tracker server
Object.keys(server.torrents)

// get the number of seeders for a particular torrent
//server.torrents[infoHash].complete

// get the number of leechers for a particular torrent
//server.torrents[infoHash].incomplete

// get the peers who are in a particular torrent swarm
//server.torrents[infoHash].peers

Here as i am not get infoHash , I have commented this out in order to run server . With this in place i am not getting consistant behavior for torrents and getting this error for some of the torrents already created with tracker as current server with given port.

Please let me know how to resolve the error and make downloading of torrent consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions