Пример #1
0
 success: (function(body) {
     try {
         let result = bencode.decode(body);
         this.debug('parsed tracker response');
         emit(this, 'announce', result);
     } catch (e) {
         this.error('failed to parse tracker response: '+e);
         emit(this, 'error', e);
     }
 }).bind(this),
Пример #2
0
 this.server.on('connection', (function(conn) {
     emit(this, 'newpeer', conn);
 }).bind(this));
Пример #3
0
 error: (function(error) {
     this.error('tracker responded with error: '+error);
     emit(this, 'error', error);
 }).bind(this)