Class: DRbRegServer

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

Instance Method Summary collapse

Constructor Details

#initialize(reg_filepath, host: 'localhost', port: '59500') ⇒ DRbRegServer

Returns a new instance of DRbRegServer.



47
48
49
50
51
52
# File 'lib/drb_reg_server.rb', line 47

def initialize(reg_filepath, host: 'localhost', port: '59500')

  @host, @port = host, port
  @reg = DWSRegistryWrapper.new reg_filepath

end

Instance Method Details

#startObject



54
55
56
57
58
59
# File 'lib/drb_reg_server.rb', line 54

def start()

  DRb.start_service "druby://#{@host}:#{@port}", @reg
  DRb.thread.join

end