class QB::IPC::STDIO::Server::InService

QB STDIO Service to proxy interactive user input from the main process to modules.

Public Class Methods

new(name:, socket_dir:, src: super name: name, socket_dir: socket_dir) click to toggle source
# File lib/qb/ipc/stdio/server/in_service.rb, line 6
def initialize name:, socket_dir:, src:
  super name: name, socket_dir: socket_dir
  @src = src
end

Public Instance Methods

work_in_thread() click to toggle source
# File lib/qb/ipc/stdio/server/in_service.rb, line 11
def work_in_thread
  while (line = @src.gets) do
    @socket.puts line
  end
  
  close!
end