Class: Thor::AppClient::Server

Inherits:
EventMachine::Connection
  • Object
show all
Defined in:
lib/ThorClient.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Server

Returns a new instance of Server.



46
47
48
# File 'lib/ThorClient.rb', line 46

def initialize(opts)
  @options = opts
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



44
45
46
# File 'lib/ThorClient.rb', line 44

def options
  @options
end

#statusObject

Returns the value of attribute status.



44
45
46
# File 'lib/ThorClient.rb', line 44

def status
  @status
end

Instance Method Details

#post_initObject



50
51
52
# File 'lib/ThorClient.rb', line 50

def post_init
  @options[:thor_client].em_post_init(self, options)
end

#receive_data(data) ⇒ Object



58
59
60
# File 'lib/ThorClient.rb', line 58

def receive_data(data)
  @options[:thor_client].em_receive(self, options, status, data)
end

#stopObject

Stops this connection



63
64
65
# File 'lib/ThorClient.rb', line 63

def stop
  puts "AppThorClient::Server::stop() - Not implemented!"
end

#unbindObject



54
55
56
# File 'lib/ThorClient.rb', line 54

def unbind
  @options[:thor_client].em_unbind(self, options)
end