Class: Rbgo::NetworkServiceFactory::Service

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host.



11
12
13
# File 'lib/rbgo/network_service.rb', line 11

def host
  @host
end

#portObject

Returns the value of attribute port.



11
12
13
# File 'lib/rbgo/network_service.rb', line 11

def port
  @port
end

#taskObject

Returns the value of attribute task.



12
13
14
# File 'lib/rbgo/network_service.rb', line 12

def task
  @task
end

#typeObject

Returns the value of attribute type.



11
12
13
# File 'lib/rbgo/network_service.rb', line 11

def type
  @type
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/rbgo/network_service.rb', line 14

def alive?
  service_routine.alive?
end

#stopObject



18
19
20
21
22
# File 'lib/rbgo/network_service.rb', line 18

def stop
  sockets.each do |sock|
    sock.close
  end
end