Class: Async::WebSocket::Client::Framer

Inherits:
Protocol::WebSocket::Framer
  • Object
show all
Defined in:
lib/async/websocket/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(pool, connection, stream) ⇒ Framer

Returns a new instance of Framer.



56
57
58
59
60
# File 'lib/async/websocket/client.rb', line 56

def initialize(pool, connection, stream)
  super(stream)
  @pool = pool
  @connection = connection
end

Instance Method Details

#closeObject



62
63
64
65
66
67
68
69
70
# File 'lib/async/websocket/client.rb', line 62

def close
  super
  
  if @pool
    @pool.release(@connection)
    @pool = nil
    @connection = nil
  end
end