HTTP2::Connection
Inherits HTTP2::Emitter / Reference / Object
Constants
DEFAULT_SETTINGS = {
settings_max_concurrent_streams: 100,
}
Our default settings
PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
First thing a HTTP/2 client sends to the server
SETTINGS_MAP = {
settings_header_table_size: 1_u16,
settings_enable_push: 2_u16,
settings_max_concurrent_streams: 3_u16,
settings_initial_window_size: 4_u16,
settings_max_frame_size: 5_u16,
settings_max_header_list_size: 6_u16,
}
Settings name/id mapping
SPEC_DEFAULT_SETTINGS = {
settings_header_table_size: 4096,
settings_enable_push: 1,
settings_max_concurrent_streams: Frame::MAX_STREAM_ID,
settings_initial_window_size: 65535,
settings_max_frame_size: 16384,
settings_max_header_list_size: (2 ** 31) - 1,
}
Default connection settings as defined in RFC 7540
Constructors
new(io)
SourceInstance methods
find_or_create_stream(stream_id)
Sourcehpack_decoder
Sourcehpack_encoder
Sourceinspect
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO) which can be overridden for custom implementations.
Also see #to_s.
new_stream_id
Sourceprocess_headers(frame : Frame)
Sourceprocess_ping(frame : Frame)
Sourceprocess_settings(frame : Frame)
Sourceprocess_window_update(frame)
Sourcereceive_and_process_frame
Sourcereceive_continuation_frames(stream : Stream)
Sourcereceive_frame(type : Frame::Type = nil)
Sourcereceive_preface
Sourcereserve_push_stream
Sourcesend_frame(frame : Frame)
Converts the Frame to bytes and sends it to the other endpoint. TODO: split HEADERS, PUSH_PROMISE and DATA frames if needed
send_goaway(error_code : Error::Code)
Sourcesend_rst_stream(error_code : Error::Code)
Sourcesend_settings
Source