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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/Bittorrent.pmod/Port.pike:1:   // Bittorrent client - originally by Mirar   #pike __REAL_VERSION__ + #require constant(Protocols.Bittorrent.Torrent)    - #if constant(.Torrent) +    constant dont_dump_program = 1;      Stdio.Port port;   int portno;   .Torrent parent;      //! Bind a port for this Torrent.   void create(.Torrent _parent)   {    parent=_parent;
pike.git/lib/modules/Protocols.pmod/Bittorrent.pmod/Port.pike:26: Inside #if constant(.Torrent)
   }    else    {    parent->my_port=portno;    return;    }       error("Failed to bind port for incoming traffic.\n");   }    - void destroy() { destruct(port); } + protected void _destruct() { destruct(port); }      protected void new_connection()   {    Stdio.File fd=port->accept();       if (!fd)    { -  parent->warning("failed to accept() (out of fds?): %s\n", +  parent->warning("failed to accept() (out of fds?): %s.\n",    strerror(errno()));    return;    }       array v=fd->query_address()/" ";    parent->peer_program(    parent,    (["peer id":"?",    "ip":v[0],    "port":(int)v[1],    "fd":fd ]) );   } - #else /* !constant(.Torrent) */ -  - constant this_program_does_not_exist=1; -  - #endif /* constant(.Torrent) */ +