Class: Rbgo::NetworkServiceFactory::Service
- Inherits:
-
Object
- Object
- Rbgo::NetworkServiceFactory::Service
- Defined in:
- lib/rbgo/network_service.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#task ⇒ Object
Returns the value of attribute task.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
12 13 14 |
# File 'lib/rbgo/network_service.rb', line 12 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
12 13 14 |
# File 'lib/rbgo/network_service.rb', line 12 def port @port end |
#task ⇒ Object
Returns the value of attribute task.
13 14 15 |
# File 'lib/rbgo/network_service.rb', line 13 def task @task end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/rbgo/network_service.rb', line 12 def type @type end |
Instance Method Details
#alive? ⇒ Boolean
15 16 17 18 |
# File 'lib/rbgo/network_service.rb', line 15 def alive? return service_routine.alive? unless service_routine.nil? false end |
#stop ⇒ Object
20 21 22 23 24 |
# File 'lib/rbgo/network_service.rb', line 20 def stop sockets.each do |sock| sock.close end end |