Class: Plum::ClientConnection
- Inherits:
-
Connection
- Object
- Connection
- Plum::ClientConnection
- Defined in:
- lib/plum/client/connection.rb
Constant Summary
Constants inherited from Connection
Plum::Connection::CLIENT_CONNECTION_PREFACE, Plum::Connection::DEFAULT_SETTINGS
Instance Attribute Summary
Attributes inherited from Connection
#hpack_decoder, #hpack_encoder, #local_settings, #remote_settings, #state, #streams
Attributes included from FlowControl
#recv_remaining_window, #send_remaining_window
Instance Method Summary collapse
-
#initialize(writer, local_settings = {}) ⇒ ClientConnection
constructor
A new instance of ClientConnection.
-
#open_stream ⇒ Object
Create a new stream for HTTP request.
Methods inherited from Connection
Methods included from ConnectionUtils
#goaway, #ping, #push_enabled?, #settings
Methods included from FlowControl
Methods included from EventEmitter
Constructor Details
#initialize(writer, local_settings = {}) ⇒ ClientConnection
Returns a new instance of ClientConnection.
5 6 7 8 9 10 11 |
# File 'lib/plum/client/connection.rb', line 5 def initialize(writer, local_settings = {}) super(writer, local_settings) writer.call(CLIENT_CONNECTION_PREFACE) settings(local_settings) @state = :waiting_settings end |
Instance Method Details
#open_stream ⇒ Object
Create a new stream for HTTP request.
14 15 16 17 |
# File 'lib/plum/client/connection.rb', line 14 def open_stream next_id = @max_stream_ids[1] + 2 stream(next_id) end |