Class: Kraken::Handler
- Inherits:
-
Object
- Object
- Kraken::Handler
- Defined in:
- lib/kraken/core/handlers/handler.rb
Overview
This class handle a Socket.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(socket) ⇒ Handler
constructor
A new instance of Handler.
- #read_trigger ⇒ Object
Constructor Details
#initialize(socket) ⇒ Handler
Returns a new instance of Handler.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/kraken/core/handlers/handler.rb', line 13 def initialize(socket) return if socket.nil? @socket = socket @thread = Thread.new do begin start rescue StandardError => e Kraken::Log.error e close end end end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
11 12 13 |
# File 'lib/kraken/core/handlers/handler.rb', line 11 def connection @connection end |