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.



74
75
76
77
78
79
# File 'lib/drb_reg_server.rb', line 74

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

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

end

Instance Method Details

#startObject



81
82
83
84
85
86
# File 'lib/drb_reg_server.rb', line 81

def start()

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

end