Class: Denko::Connection::HandshakeAttempt

Inherits:
Object
  • Object
show all
Defined in:
lib/denko/connection/handshake.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHandshakeAttempt

Returns a new instance of HandshakeAttempt.



7
8
9
10
# File 'lib/denko/connection/handshake.rb', line 7

def initialize
  @acknowledged = false
  @result = nil
end

Instance Attribute Details

#acknowledgedObject (readonly)

Returns the value of attribute acknowledged.



6
7
8
# File 'lib/denko/connection/handshake.rb', line 6

def acknowledged
  @acknowledged
end

#resultObject (readonly)

Returns the value of attribute result.



6
7
8
# File 'lib/denko/connection/handshake.rb', line 6

def result
  @result
end

Instance Method Details

#update(line) ⇒ Object



12
13
14
15
16
17
# File 'lib/denko/connection/handshake.rb', line 12

def update(line)
  if line.match(/\AACK:/)
    @result = line.split(":", 2)[1]
    @acknowledged = true
  end
end