class Net::SSH::Connection::Channel
def on_process(&block)
end
channel[:data] = $'
puts $&
if channel[:data] =~ /^.*?\n/
channel.on_process do |ch|
end
channel[:data] << data
channel.on_data do |ch, data|
channel[:data] = ""
at a time when the channel is processed:
the channel itself, and displays individual lines in the input one
Here's an example that accumulates the channel data into a variable on
as the sole argument.
connection (not the channel). This callback is invoked with the channel
but it will be called roughly once for each packet received by the
this channel. There are no guarantees on timeliness in the event loop,
Registers a callback to be invoked for each pass of the event loop for
def on_process(&block) old, @on_process = @on_process, block old end