Class: RubyProxy::DRbServer
- Inherits:
-
Object
- Object
- RubyProxy::DRbServer
- Defined in:
- lib/ruby_proxy/server.rb
Class Attribute Summary collapse
-
.ip ⇒ Object
Returns the value of attribute ip.
-
.port ⇒ Object
Returns the value of attribute port.
Class Method Summary collapse
Class Attribute Details
.ip ⇒ Object
Returns the value of attribute ip.
14 15 16 |
# File 'lib/ruby_proxy/server.rb', line 14 def ip @ip end |
.port ⇒ Object
Returns the value of attribute port.
14 15 16 |
# File 'lib/ruby_proxy/server.rb', line 14 def port @port end |
Class Method Details
.start_service ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ruby_proxy/server.rb', line 17 def self.start_service DRb.install_id_conv(DRb::TimerIdConv.new) DRb.start_service("druby://#{ip}:#{port}",Proxy) #~ trap("INT") { DRb.stop_service } # for ruby1.9 begin DRb.thread.join rescue Interrupt ensure DRb.stop_service end end |
.stop_service ⇒ Object
30 31 32 |
# File 'lib/ruby_proxy/server.rb', line 30 def self.stop_service DRb.stop_service end |