Class: ServerEngine::ProcessManager::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/serverengine/process_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pipe) ⇒ Target

Returns a new instance of Target.



492
493
494
# File 'lib/serverengine/process_manager.rb', line 492

def initialize(pipe)
  @pipe = pipe
end

Instance Attribute Details

#pipeObject (readonly)

Returns the value of attribute pipe.



496
497
498
# File 'lib/serverengine/process_manager.rb', line 496

def pipe
  @pipe
end

Instance Method Details

#closeObject



502
503
504
505
506
507
# File 'lib/serverengine/process_manager.rb', line 502

def close
  if @pipe
    @pipe.close rescue nil
    @pipe = nil
  end
end

#heartbeat!Object



498
499
500
# File 'lib/serverengine/process_manager.rb', line 498

def heartbeat!
  @pipe.write HEARTBEAT_MESSAGE
end