Top Level Namespace
Defined Under Namespace
Classes: CommandServer, SomeWorkClass
Instance Method Summary collapse
Instance Method Details
#proc_command(addr, cmd) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/command_server/command_shell.rb', line 6 def proc_command(addr, cmd) UNIXSocket.open(addr) do |socket| socket.puts cmd while(line = socket.gets) do $stdout.puts line end end rescue Errno::ENOENT raise IOError.new("[CommandShell] Error: Unavailable socket: #{addr}") end |