Class: Conquer::RPC

Inherits:
Object
  • Object
show all
Includes:
Celluloid::IO, Celluloid::Internals::Logger, Celluloid::Notifications
Defined in:
lib/conquer/rpc.rb

Instance Method Summary collapse

Constructor Details

#initializeRPC

Returns a new instance of RPC.



12
13
14
15
16
# File 'lib/conquer/rpc.rb', line 12

def initialize
  info('Starting rpc server')
  @server = UNIXServer.new(RPC_SOCKET)
  async.run
end

Instance Method Details

#event(type, *args) ⇒ Object



22
23
24
# File 'lib/conquer/rpc.rb', line 22

def event(type, *args)
  publish(type, *args)
end

#shutdownObject



18
19
20
# File 'lib/conquer/rpc.rb', line 18

def shutdown
  @server.close if @server
end