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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pool, connection, stream) ⇒ Framer

Returns a new instance of Framer.



80
81
82
83
84
# File 'lib/async/websocket/client.rb', line 80

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

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



86
87
88
# File 'lib/async/websocket/client.rb', line 86

def connection
  @connection
end

Instance Method Details

#closeObject



88
89
90
91
92
93
94
95
96
# File 'lib/async/websocket/client.rb', line 88

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