pike.git / lib / modules / Protocols.pmod / Bittorrent.pmod / Peer.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/Bittorrent.pmod/Peer.pike:1:   // Bittorrent client - originally by Mirar   #pike __REAL_VERSION__ + #require constant(Protocols.Bittorrent.Torrent)    - #if constant(.Torrent) -  +    constant dont_dump_program = 1;      Stdio.File fd=Stdio.File();      .Torrent parent;      string ip;   int port;   string id;   string client_version="unknown";
pike.git/lib/modules/Protocols.pmod/Bittorrent.pmod/Peer.pike:283: Inside #if constant(.Torrent)
   piece_callback=([]);       catch { parent->peer_lost(this); };       call_out(garb,GARB_DELAY);   }      void garb()   {    if (online || find_call_out(connect)!=-1) return; -  parent->peers_ordered-=({this_object()}); -  parent->peers_unused-=({this_object()}); +  parent->peers_ordered-=({this}); +  parent->peers_unused-=({this});    m_delete(parent->peers,id); -  destruct(this_object()); +  destruct(this);   }      void connection_timeout()   {    if (CONNECTION_DEAD_RETRY>0)    call_out(connect,CONNECTION_DEAD_RETRY);    drop("dead","timeout");   }      //! Disconnect a peer.
pike.git/lib/modules/Protocols.pmod/Bittorrent.pmod/Peer.pike:1018: Inside #if constant(.Torrent)
   strangled?" strangled":"",    is_activated()?" activated":"",    handover?" handover":"",    bandwidth_in,bandwidth_out,    sizeof(queued_pieces),    sizeof(piece_callback),    sizeof(sendbuf));    return 0;   }    - void destroy() + protected void _destruct()   {    drop(0);   }      // ----------------------------------------------------------------      protected private int bandwidth_in_count=0;   protected private int bandwidth_out_count=0;   protected private int bandwidth_t0=time(1);   protected private float bandwidth_t=time(bandwidth_t0);
pike.git/lib/modules/Protocols.pmod/Bittorrent.pmod/Peer.pike:1052: Inside #if constant(.Torrent)
   bandwidth_out_a=bandwidth_out_a[1..];    }       bandwidth_in=Array.sum(bandwidth_in_a)/sizeof(bandwidth_in_a);    bandwidth_out=Array.sum(bandwidth_out_a)/sizeof(bandwidth_out_a);       bandwidth_in_count=0;    bandwidth_out_count=0;    bandwidth_t=t1;   } -  - #else /* !constant(.Torrent) */ -  - constant this_program_does_not_exist=1; -  - #endif /* constant(.Torrent) */ +