Class: XKoon::Service

Inherits:
RxIO::Service
  • Object
show all
Defined in:
lib/xkoon/service.rb

Overview

Service Class

Constant Summary collapse

DEFAULT_ADDR =

Defaults

'localhost'
DEFAULT_PORT =
23255

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(processor, addr = DEFAULT_ADDR, port = DEFAULT_PORT, ssl_params = nil) ⇒ Service

Construct: Builds a Service around a given processor implementation, set to listen for incoming connections @ addr on port.

Parameters:

  • processor (Module)
  • addr (String) (defaults to: DEFAULT_ADDR)
  • port (Fixnum) (defaults to: DEFAULT_PORT)
  • ssl_params (Hash) (defaults to: nil)


31
32
33
34
35
36
37
38
# File 'lib/xkoon/service.rb', line 31

def initialize processor, addr = DEFAULT_ADDR, port = DEFAULT_PORT, ssl_params = nil

	# Super
	super addr, port, Handler, ssl_params

	# Set Processor
	@processor = processor
end

Instance Attribute Details

#processorObject (readonly)

Attribute Accessors



19
20
21
# File 'lib/xkoon/service.rb', line 19

def processor
  @processor
end