abstract datatype: http2_machine()
opts() = #{enable_connect_protocol => boolean(), initial_connection_window_size => 65535..2147483647, initial_stream_window_size => 0..2147483647, max_concurrent_streams => non_neg_integer() | infinity, max_decode_table_size => non_neg_integer(), max_encode_table_size => non_neg_integer(), max_frame_size_received => 16384..16777215, max_frame_size_sent => 16384..16777215 | infinity, preface_timeout => timeout(), settings_timeout => timeout()}
pseudo_headers() = #{} | #{status := cow_http:status()} | #{method := binary(), authority := binary()} | #{method := binary(), scheme := binary(), authority := binary(), path := binary(), protocol => binary()}
frame(Frame::cow_http2:frame(), State) -> {ok, State} | {ok, {data, cow_http2:streamid(), cow_http2:fin(), binary()}, State} | {ok, {headers, cow_http2:streamid(), cow_http2:fin(), cow_http:headers(), pseudo_headers(), non_neg_integer() | undefined}, State} | {ok, {trailers, cow_http2:streamid(), cow_http:headers()}, State} | {ok, {rst_stream, cow_http2:streamid(), cow_http2:error()}, State} | {ok, {push_promise, cow_http2:streamid(), cow_http2:streamid(), cow_http:headers(), pseudo_headers()}, State} | {ok, {goaway, cow_http2:streamid(), cow_http2:error(), binary()}, State} | {send, [{cow_http2:streamid(), cow_http2:fin(), [{data, iodata()} | #sendfile{offset = non_neg_integer(), bytes = pos_integer(), path = file:name_all()} | {trailers, cow_http:headers()}]}], State} | {error, {stream_error, cow_http2:streamid(), cow_http2:error(), atom()}, State} | {error, {connection_error, cow_http2:error(), atom()}, State}
get_last_streamid(Http2_machine::http2_machine()) -> cow_http2:streamid()
get_local_setting(Key::atom(), Http2_machine::http2_machine()) -> atom() | integer()
get_stream_local_state(StreamID::cow_http2:streamid(), State::http2_machine()) -> {ok, idle | cow_http2:fin(), empty | nofin | fin} | {error, not_found | closed}
get_stream_remote_state(StreamID::cow_http2:streamid(), State::http2_machine()) -> {ok, idle | cow_http2:fin()} | {error, not_found | closed}
ignored_frame(State) -> {ok, State} | {error, {connection_error, protocol_error, atom()}, State}
init(X1::client | server, Opts::opts()) -> {ok, iodata(), http2_machine()}
init_stream(Method::binary(), State) -> {ok, cow_http2:streamid(), State}
init_upgrade_stream(Method::binary(), State) -> {ok, cow_http2:streamid(), State}
prepare_headers(StreamID::cow_http2:streamid(), State, IsFin0::idle | cow_http2:fin(), PseudoHeaders::pseudo_headers(), Headers0::cow_http:headers()) -> {ok, cow_http2:fin(), iodata(), State}
prepare_push_promise(StreamID::cow_http2:streamid(), State, PseudoHeaders::pseudo_headers(), Headers0::cow_http:headers()) -> {ok, cow_http2:streamid(), iodata(), State} | {error, no_push}
prepare_trailers(StreamID::cow_http2:streamid(), State, Trailers::cow_http:headers()) -> {ok, iodata(), State}
reset_stream(StreamID::cow_http2:streamid(), State) -> {ok, State} | {error, not_found}
send_or_queue_data(StreamID::cow_http2:streamid(), State, IsFin0::cow_http2:fin(), DataOrFileOrTrailers) -> {ok, State} | {send, [{cow_http2:streamid(), cow_http2:fin(), [DataOrFileOrTrailers]}], State}
timeout(X1::preface_timeout | settings_timeout, TRef::reference(), State) -> {ok, State} | {error, {connection_error, cow_http2:error(), atom()}, State}
update_window(Size::1..2147483647, State) -> State
update_window(StreamID::cow_http2:streamid(), Size::1..2147483647, State) -> State
Generated by EDoc