Method: Zashoku.command_server

Defined in:
lib/zashoku.rb

.command_server(command, host, port) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/zashoku.rb', line 56

def self.command_server(command, host, port)
  case command
  when 'start'
    start_daemon(port)
  when 'restart'
    command_server('stop')
    start_daemon
  else
    require_relative 'core/net/client'
    Net::Client.command(host, port, command)
  end
end