Class: Net::SSH::Connection::Session
- Inherits:
-
Object
- Object
- Net::SSH::Connection::Session
- Includes:
- Open3
- Defined in:
- lib/net-ssh-open3.rb
Instance Attribute Summary collapse
-
#open3_logger ⇒ Object
Returns the value of attribute open3_logger.
Instance Method Summary collapse
- #close(*args, &block) ⇒ Object
-
#initialize(*args, &block) ⇒ Session
constructor
Overridden version of
initializewhich starts an Open3 SSH loop.
Methods included from Open3
#capture2, #capture2e, #capture3, #popen2, #popen2e, #popen3
Constructor Details
#initialize(*args, &block) ⇒ Session
Overridden version of initialize which starts an Open3 SSH loop.
437 438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/net-ssh-open3.rb', line 437 def initialize(*args, &block) initialize_without_open3(*args, &block) @open3_channels_mutex = Mutex.new # open3_ping method will pull waiter thread out of select(2) call # to update watched Channels and IOs and process incomes. @open3_pinger_reader, @open3_pinger_writer = IO.pipe listen_to(@open3_pinger_reader) { @open3_pinger_reader.readpartial(1) } @session_loop = Thread.new { open3_loop } end |
Instance Attribute Details
#open3_logger ⇒ Object
Returns the value of attribute open3_logger.
432 433 434 |
# File 'lib/net-ssh-open3.rb', line 432 def open3_logger @open3_logger end |
Instance Method Details
#close(*args, &block) ⇒ Object
451 452 453 454 |
# File 'lib/net-ssh-open3.rb', line 451 def close(*args, &block) @open3_closing = true close_without_open3(*args, &block).tap { open3_ping rescue nil } end |