class Invoker::IPC::BaseCommand

Attributes

client_socket[RW]

Public Class Methods

new(client_socket) click to toggle source
# File lib/invoker/ipc/base_command.rb, line 5
def initialize(client_socket)
  @client_socket = client_socket
end

Public Instance Methods

run_command(message_object) click to toggle source

Invoke the command that actual processes incoming message returning true from this message means, command has been processed and client socket can be closed. returning false means, it is a long running command and socket should not be closed immediately @param [Invoker::IPC::Message] incoming message @return [Boolean] true or false

# File lib/invoker/ipc/base_command.rb, line 19
def run_command(message_object)
  raise "Not implemented"
end
send_data(message_object) click to toggle source
# File lib/invoker/ipc/base_command.rb, line 9
def send_data(message_object)
  client_socket.write(message_object.encoded_message)
end