class Hokaido::Broadcast::OutputHandler
Public Class Methods
new(ptyout, connection)
click to toggle source
# File lib/hokaido/broadcast.rb, line 26 def initialize(ptyout, connection) @ptyout, @connection = ptyout, connection async.run end
Public Instance Methods
run()
click to toggle source
# File lib/hokaido/broadcast.rb, line 32 def run while chunk = @ptyout.readpartial(4096) $stdout.write chunk @connection.async.send chunk end rescue EOFError, Errno::EIO # do nothing ensure terminate end