Module h2_connection

Behaviours: gen_fsm.

Data Types

connection()

connection() = #connection{type = client | server | undefined, ssl_options = any(), listen_ref = non_neg_integer() | undefined, socket = sock:socket(), peer_settings = settings(), self_settings = settings(), send_window_size = integer(), recv_window_size = integer(), decode_context = hpack:context(), encode_context = hpack:context(), settings_sent = queue:queue(), next_available_stream_id = stream_id(), streams = h2_stream_set:stream_set(), stream_callback_mod = module(), buffer = empty | {binary, binary()} | {frame, h2_frame:header(), binary()}, continuation = undefined | #continuation_state{stream_id = stream_id(), promised_id = undefined | stream_id(), frames = queue:queue(h2_frame:frame()), type = headers | push_promise | trailers, end_stream = boolean(), end_headers = boolean()}, flow_control = auto | manual}

send_option()

send_option() = {send_end_stream, boolean()}

send_opts()

send_opts() = [send_option()]

Function Index

become/1
become/2
closing/2
code_change/4
connected/2
continuation/2
get_peer/1
get_peercert/1
get_response/2
get_streams/1
go_away/2
handle_event/3
handle_info/3
handle_sync_event/4
handshake/2
init/1
is_push/1
listen/2
new_stream/1
new_stream/2
send_body/3
send_body/4
send_frame/2
send_headers/3
send_headers/4
send_promise/4
send_request/3
send_window_update/2
start_client_link/5
start_server_link/3
start_ssl_upgrade_link/5
stop/1
terminate/3

Function Details

become/1

become(Socket::socket()) -> no_return()

become/2

become(X1::socket(), Http2Settings::settings()) -> no_return()

closing/2

closing(Message, Connection) -> any()

code_change/4

code_change(OldVsn, StateName, Conn, Extra) -> any()

connected/2

connected(X1, Connection) -> any()

continuation/2

continuation(X1, Connection) -> any()

get_peer/1

get_peer(Pid::pid()) -> {ok, {inet:ip_address(), inet:port_number()}} | {error, term()}

get_peercert/1

get_peercert(Pid::pid()) -> {ok, binary()} | {error, term()}

get_response/2

get_response(Pid::pid(), StreamId::stream_id()) -> {ok, {hpack:headers(), iodata()}} | {error, term()}

get_streams/1

get_streams(Pid::pid()) -> h2_stream_set:stream_set()

go_away/2

go_away(ErrorCode::error_code(), Connection::connection()) -> {next_state, closing, connection()}

handle_event/3

handle_event(E, StateName, Conn) -> any()

handle_info/3

handle_info(M, StateName, H2_listening_state) -> any()

handle_sync_event/4

handle_sync_event(E, F, StateName, Connection) -> any()

handshake/2

handshake(X1::timeout | {frame, h2_frame:frame()}, State::connection()) -> {next_state, handshake | connected | closing, connection()}

init/1

init(X1) -> any()

is_push/1

is_push(Pid::pid()) -> boolean()

listen/2

listen(X1, State) -> any()

new_stream/1

new_stream(Pid::pid()) -> stream_id()

new_stream/2

new_stream(Pid::pid(), NotifyPid::pid()) -> stream_id() | {error, error_code()}

send_body/3

send_body(Pid::pid(), StreamId::stream_id(), Body::binary()) -> ok

send_body/4

send_body(Pid::pid(), StreamId::stream_id(), Body::binary(), Opts::send_opts()) -> ok

send_frame/2

send_frame(Pid, Bin) -> any()

send_headers/3

send_headers(Pid::pid(), StreamId::stream_id(), Headers::hpack:headers()) -> ok

send_headers/4

send_headers(Pid::pid(), StreamId::stream_id(), Headers::hpack:headers(), Opts::send_opts()) -> ok

send_promise/4

send_promise(Pid::pid(), StreamId::stream_id(), NewStreamId::stream_id(), Headers::hpack:headers()) -> ok

send_request/3

send_request(Pid::pid(), Headers::hpack:headers(), Body::binary()) -> ok

send_window_update/2

send_window_update(Pid::pid(), Size::non_neg_integer()) -> ok

start_client_link/5

start_client_link(Transport::gen_tcp | ssl, Host::inet:ip_address() | inet:hostname(), Port::inet:port_number(), SSLOptions::[ssl:ssl_option()], Http2Settings::settings()) -> {ok, pid()} | ignore | {error, term()}

start_server_link/3

start_server_link(X1::socket(), SSLOptions::[ssl:ssl_option()], Settings::#settings{}) -> {ok, pid()} | ignore | {error, term()}

start_ssl_upgrade_link/5

start_ssl_upgrade_link(Host::inet:ip_address() | inet:hostname(), Port::inet:port_number(), InitialMessage::binary(), SSLOptions::[ssl:ssl_option()], Http2Settings::settings()) -> {ok, pid()} | ignore | {error, term()}

stop/1

stop(Pid::pid()) -> ok

terminate/3

terminate(Reason, StateName, Conn) -> any()


Generated by EDoc, Jan 15 2017, 13:36:46.