Behaviours: ?GEN_SERVER.
This module defines the xmpp_stream_in behaviour.
Optional callback functions: init/1, handle_cast/2, handle_call/3, handle_info/2, terminate/2, code_change/3, handle_stream_start/2, handle_stream_established/1, handle_stream_end/2, handle_cdata/2, handle_authenticated_packet/2, handle_unauthenticated_packet/2, handle_unbinded_packet/2, handle_auth_success/4, handle_auth_failure/4, handle_send/3, handle_recv/3, handle_timeout/1, get_password_fun/1, get_password_fun/2, check_password_fun/2, check_password_digest_fun/2, bind/2, compress_methods/1, tls_options/1, tls_required/1, tls_enabled/1, sasl_mechanisms/2, unauthenticated_stream_features/1, authenticated_stream_features/1.
next_state() = noreply() | {stop, term(), state()}
noreply() = {noreply, state(), timeout()}
state() = #{owner := pid(), mod := module(), socket := xmpp_socket:socket(), socket_mod => xmpp_socket:sockmod(), socket_opts => [proplists:property()], socket_monitor => reference(), stream_timeout := {integer(), integer()} | infinity, stream_state := stream_state(), stream_direction => in | out, stream_id => binary(), stream_header_sent => boolean(), stream_restarted => boolean(), stream_compressed => boolean(), stream_encrypted => boolean(), stream_version => {non_neg_integer(), non_neg_integer()}, stream_authenticated => boolean(), ip => {inet:ip_address(), inet:port_number()}, codec_options => [xmpp:decode_option()], xmlns => binary(), lang => binary(), user => binary(), server => binary(), resource => binary(), lserver => binary(), remote_server => binary(), sasl_mech => binary(), sasl_state => xmpp_sasl:sasl_state(), term() => term()}
stop_reason() = {stream, reset | {in | out, stream_error()}} | {tls, inet:posix() | atom() | binary()} | {socket, inet:posix() | atom()} | internal_failure
stream_state() = accepting | wait_for_stream | wait_for_handshake | wait_for_starttls | wait_for_sasl_request | wait_for_sasl_response | wait_for_bind | established | disconnected
accept(Pid::pid()) -> ok
call(Ref, Msg, Timeout) -> any()
cast(Ref, Msg) -> any()
change_shaper(State::state(), Shaper::none | p1_shaper:state()) -> state()
close(Pid::pid(), Reason::atom()) -> ok
format_error(Err::stop_reason()) -> binary()
get_transport(X1::state()) -> atom()
handle_call(Call::term(), From::term(), State::state()) -> next_state()
handle_cast(Cast::term(), State::state()) -> next_state()
handle_info(Info::term(), State::state()) -> next_state()
init(X1) -> any()
reply(Ref, Reply) -> any()
send_error(State::state(), Pkt::xmpp_element() | xmlel(), Err::stanza_error()) -> state()
start(Mod, Args, Opts) -> any()
start_link(Mod, Args, Opts) -> any()
Generated by EDoc