Method: Net::SSH::Connection::Channel#do_data

Defined in:
lib/net/ssh/connection/channel.rb

#do_data(data) ⇒ Object

Invokes the #on_data callback when the server sends data to the channel. This will reduce the available window size on the local end, but does not actually throttle requests that come in illegally when the window size is too small. The callback is invoked with the channel as the first argument, and the data as the second.



566
567
568
569
# File 'lib/net/ssh/connection/channel.rb', line 566

def do_data(data) #:nodoc:
  update_local_window_size(data.length)
  @on_data.call(self, data) if @on_data
end