class

HT2::Stream

Inherits Reference < Object

Constructors

new(connection : Connection, id : UInt32, initial_state : StreamState = StreamState::IDLE)
Source

Instance methods

closed?
Source
closed_at
Source
closed_at=(closed_at : Time | Nil)
Source
connection
Source
created_at
Source
data
Source
data=(data : IO::Memory)
Source
end_stream_received=(end_stream_received : Bool)
Source
end_stream_received?
Source
end_stream_sent=(end_stream_sent : Bool)
Source
end_stream_sent?
Source
error_count

Error tracking for state isolation

Source
error_rate
Source
flow_control_errors
Source
idle_time
Source
last_error_time
Source
notify_window_update

Notify waiting fibers that window has been updated

Source
priority
Source
protocol_errors
Source
receive_data(data : Bytes, end_stream : Bool) : Nil
Source
receive_headers(headers : Array(Tuple(String, String)), end_stream : Bool, priority : Bool = false) : Nil
Source
receive_priority(priority : PriorityData) : Nil
Source
receive_rst_stream(error_code : ErrorCode) : Nil
Source
received_data
Source
recent_errors?(window : Time::Span = 10.seconds) : Bool
Source
record_error(error_type : Symbol = :general) : Nil

Error tracking methods for state isolation

Source
recv_window_size
Source
recv_window_size=(recv_window_size : Int64)
Source
request_headers
Source
request_headers=(request_headers : Array(Tuple(String, String)) | Nil)
Source
request_trailers
Source
request_trailers=(request_trailers : Array(Tuple(String, String)) | Nil)
Source
response_headers
Source
response_headers=(response_headers : Array(Tuple(String, String)) | Nil)
Source
response_trailers
Source
response_trailers=(response_trailers : Array(Tuple(String, String)) | Nil)
Source
send_data(data : Bytes, end_stream : Bool = false) : Nil
Source
send_data_chunked(data : Bytes, chunk_size : Int32 = 16384, end_stream : Bool = false) : Nil
Source
send_data_multi(chunks : Array(Bytes), end_stream : Bool = false) : Nil

Send data using multiple frames efficiently

Source
send_headers(headers : Array(Tuple(String, String)), end_stream : Bool = false) : Nil
Source
send_rst_stream(error_code : ErrorCode) : Nil
Source
send_window_size
Source
send_window_size=(send_window_size : Int64)
Source
should_cleanup?
Source
state
Source
state_machine
Source
update_recv_window(increment : Int32) : Nil
Source
update_send_window(increment : Int32) : Nil
Source