Method: Net::SSH::Connection::Channel#on_close
- Defined in:
- lib/net/ssh/connection/channel.rb
#on_close(&block) ⇒ Object
Registers a callback to be invoked when the server acknowledges that a channel is closed. This is invoked with the channel as the sole argument.
channel.on_close do |ch|
puts "remote end is closing!"
end
383 384 385 386 |
# File 'lib/net/ssh/connection/channel.rb', line 383 def on_close(&block) old, @on_close = @on_close, block old end |