Class: RubyProxy::DRbServer

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.ip=(value) ⇒ Object (writeonly)

Sets the attribute ip

Parameters:

  • value

    the value to set the attribute ip to.



9
10
11
# File 'lib/ruby_proxy/server.rb', line 9

def ip=(value)
  @ip = value
end

.port=(value) ⇒ Object (writeonly)

Sets the attribute port

Parameters:

  • value

    the value to set the attribute port to.



9
10
11
# File 'lib/ruby_proxy/server.rb', line 9

def port=(value)
  @port = value
end

Class Method Details

.start_serviceObject



11
12
13
14
15
# File 'lib/ruby_proxy/server.rb', line 11

def self.start_service
  DRb.install_id_conv(DRb::TimerIdConv.new)
  DRb.start_service("druby://#{@ip}:#{@port}",Proxy)
  DRb.thread.join
end

.stop_serviceObject



16
17
18
# File 'lib/ruby_proxy/server.rb', line 16

def self.stop_service
  DRb.stop_service
end