pike.git / lib / modules / Protocols.pmod / Line.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/Line.pmod:180:       //! Queue of data that is pending to send.    //!    //! The elements in the queue are either strings with data to send,    //! or @expr{0@} (zero) which is the end of file marker. The connection    //! will be closed when the end of file marker is reached.    //!    //! @seealso    //! @[send()], @[disconnect()]    //! -  object(ADT.Queue) send_q = ADT.Queue(); +  ADT.Queue send_q = ADT.Queue();       protected string write_buffer = "";    protected void write_callback(mixed ignored)    {    touch_time();       while (!sizeof(write_buffer)) {    if (send_q->is_empty()) {    con->set_write_callback(0);    return;
pike.git/lib/modules/Protocols.pmod/Line.pmod:280:    //! @[con] is the connection.    //!    //! @[timeout] is an optional timeout in seconds after which the connection    //! will be closed if there has been no data sent or received.    //!    //! If @[timeout] is @expr{0@} (zero), no timeout will be in effect.    //!    //! @seealso    //! @[touch_time()], @[do_timeout()]    //! -  void create(object(Stdio.File) con, int|void timeout) +  void create(Stdio.File con, int|void timeout)    { -  this_program::con = con; -  this_program::timeout = timeout; +  this::con = con; +  this::timeout = timeout;       // Start the timeout handler.    touch_time();    _timeout_cb();       con->set_nonblocking(read_callback, 0, close_callback);    }   };      //! Nonblocking line-oriented I/O with support for sending SMTP-style codes.