Method: Net::SSH::Connection::Channel#close
- Defined in:
- lib/net/ssh/connection/channel.rb
#close ⇒ Object
Requests that the channel be closed. If the channel is already closing, this does nothing, nor does it do anything if the channel has not yet been confirmed open (see #do_open_confirmation). Otherwise, it sends a CHANNEL_CLOSE message and marks the channel as closing.
284 285 286 287 288 289 290 |
# File 'lib/net/ssh/connection/channel.rb', line 284 def close return if @closing if remote_id @closing = true connection.(Buffer.from(:byte, CHANNEL_CLOSE, :long, remote_id)) end end |