Class: HTTP2::Server
- Inherits:
-
Connection
- Object
- Connection
- HTTP2::Server
- Defined in:
- lib/http/2/server.rb
Overview
HTTP 2.0 server connection class that implements appropriate header compression / decompression algorithms and stream management logic.
Your code is responsible for feeding request data to the server object, which in turn performs all of the necessary HTTP 2.0 decoding / encoding, state management, and the rest. A simple example:
Instance Attribute Summary
Attributes inherited from Connection
#active_stream_count, #error, #local_settings, #local_window, #pending_settings, #remote_settings, #remote_window, #state
Instance Method Summary collapse
-
#initialize(**settings) ⇒ Server
constructor
Initialize new HTTP 2.0 server object.
Methods inherited from Connection
#goaway, #new_stream, #ping, #receive, #settings
Methods included from Emitter
Methods included from FlowBuffer
Constructor Details
#initialize(**settings) ⇒ Server
Initialize new HTTP 2.0 server object.
25 26 27 28 29 30 31 32 33 |
# File 'lib/http/2/server.rb', line 25 def initialize(**settings) @stream_id = 2 @state = :waiting_magic @local_role = :server @remote_role = :client super end |