Bandit.HTTP2.Connection (Bandit v0.3.7) View Source
Represents the state of an HTTP/2 connection
Link to this section Summary
Link to this section Types
Specs
error() :: {:connection, Bandit.HTTP2.Errors.error_code(), String.t()}
A description of a connection error
Specs
t() :: %Bandit.HTTP2.Connection{
fragment_frame: Bandit.HTTP2.Frame.Headers.t() | nil,
local_settings: Bandit.HTTP2.Settings.t(),
peer: ThousandIsland.Transport.socket_info(),
pending_sends: [
{Bandit.HTTP2.Stream.stream_id(), iodata(), boolean(), (... -> any())}
],
plug: Bandit.plug(),
recv_hpack_state: HPAX.Table.t(),
recv_window_size: non_neg_integer(),
remote_settings: Bandit.HTTP2.Settings.t(),
send_hpack_state: HPAX.Table.t(),
send_window_size: non_neg_integer(),
streams: Bandit.HTTP2.StreamCollection.t()
}
Encapsulates the state of an HTTP/2 connection
Link to this section Functions
Specs
handle_frame(Bandit.HTTP2.Frame.frame(), ThousandIsland.Socket.t(), t()) :: ThousandIsland.Handler.handler_result()
Specs
init(ThousandIsland.Socket.t(), Bandit.plug()) :: {:ok, t()} | {:error, term()}
Link to this function
send_data(stream_id, pid, data, end_stream, on_unblock, socket, connection)
View SourceSpecs
send_data( Bandit.HTTP2.Stream.stream_id(), pid(), iodata(), boolean(), (... -> any()), ThousandIsland.Socket.t(), t() ) :: {:ok, boolean(), t()} | {:error, term()}
Link to this function
send_headers(stream_id, pid, headers, end_stream, socket, connection)
View SourceSpecs
send_headers( Bandit.HTTP2.Stream.stream_id(), pid(), Plug.Conn.headers(), boolean(), ThousandIsland.Socket.t(), t() ) :: {:ok, t()} | {:error, term()}
Specs
send_push( Bandit.HTTP2.Stream.stream_id(), Plug.Conn.headers(), ThousandIsland.Socket.t(), t() ) :: {:ok, t()} | {:error, term()}
Specs
shutdown_connection( Bandit.HTTP2.Errors.error_code(), term(), ThousandIsland.Socket.t(), t() ) :: {:ok, :close, t()} | {:error, term(), t()}