Skip to content
  • Niels Möller's avatar
    * src/connection.h (ssh_connection): New attribute socket, · 980f0d48
    Niels Möller authored
    replaces old attribute raw. New attributes hard_limit and
    soft_limit.
    
    Implemented flow control for the connections write_buffer. The
    buffer is now of limited size. When it starts to get large, channel
    i/o is disabled. If it hits the limit, the connection is closed.
    * src/connection.c (WRITE_BUFFER_MAX, WRITE_BUFFER_MARGIN): New
    constants.
    (connection_flow_controlled): New class.
    (do_connection_flow_controlled): Reenable channel i/o when we have
    room in the write buffer.
    (make_ssh_connection): Initialize ssh_connection attributes
    wakeup, soft_limit and hard_limit.
    (connection_init_io): Changed argument type from struct
    abstract_write to struct lsh_fd. Install flow control on the
    socket's write_buffer.
    (connection_wakeup): New function, which installs a wakeup
    callback on the connection.
    (connection_send_kex): Compare the size of the write_buffer to the
    soft and hard limits.
    (connection_send_kex_end): Invoke wakeup callback, if it's
    non-NULL.
    
    Rev: src/connection.c:1.81
    Rev: src/connection.h:1.72
    980f0d48