Module xmpp_stream_out

Behaviours: ?GEN_SERVER.

This module defines the xmpp_stream_out behaviour.
Optional callback functions: init/1, handle_cast/2, handle_call/3, handle_info/2, terminate/2, code_change/3, handle_connect/1, handle_stream_start/2, handle_stream_established/1, handle_stream_downgraded/2, handle_stream_end/2, handle_cdata/2, handle_send/3, handle_recv/3, handle_timeout/1, handle_authenticated_features/2, handle_unauthenticated_features/2, handle_auth_success/2, handle_auth_failure/3, handle_bind_success/1, handle_bind_failure/2, handle_packet/2, tls_options/1, tls_required/1, tls_verify/1, tls_enabled/1, resolve/2, sasl_mechanisms/1, dns_timeout/1, dns_retries/1, default_port/1, connect_options/3, address_families/1, connect_timeout/1.

Data Types

next_state()

next_state() = noreply() | {stop, term(), state()}

noreply()

noreply() = {noreply, state(), timeout()}

socket_error_reason()

socket_error_reason() = inet:posix() | atom()

state()

state() = #{owner := pid(), mod := module(), server := binary(), user := binary(), resource := binary(), password := binary(), lang := binary(), remote_server := binary(), xmlns := binary(), codec_options := [xmpp:decode_option()], stream_direction := in | out, stream_timeout := integer() | infinity, stream_id := binary(), stream_encrypted := boolean(), stream_verified := boolean(), stream_authenticated := boolean(), stream_restarted := boolean(), stream_state := stream_state(), stream_remote_id => binary(), ip => {inet:ip_address(), inet:port_number()}, socket => xmpp_socket:socket(), socket_monitor => reference(), sasl_mech => binary(), sasl_mechs_available => [binary()], sasl_mechs_provided => [binary()], sasl_failure => sasl_failure() | binary(), bind_id => binary(), session_response_id => binary(), term() => term()}

stop_reason()

stop_reason() = {idna, bad_string} | {dns, inet:posix() | atom()} | {stream, reset | {in | out, stream_error()}} | {tls, tls_error_reason()} | {pkix, binary()} | {auth, atom() | binary() | string()} | {bind, stanza_error() | undefined} | {socket, socket_error_reason()} | internal_failure

stream_state()

stream_state() = connecting | wait_for_stream | wait_for_features | wait_for_starttls_response | wait_for_sasl_response | wait_for_bind_response | wait_for_session_response | downgraded | established | disconnected

tls_error_reason()

tls_error_reason() = inet:posix() | atom() | binary()

Function Index

bind/2
call/3
cast/2
change_shaper/2
close/1
close/2
code_change/3
connect/1
establish/1
format_error/1
get_transport/1
handle_call/3
handle_cast/2
handle_info/2
init/1
reply/2
send/2
set_timeout/2
start/3
start_link/3
stop/1
terminate/2

Function Details

bind/2

bind(State::state(), StreamFeatures::stream_features()) -> state()

call/3

call(Ref, Msg, Timeout) -> any()

cast/2

cast(Ref, Msg) -> any()

change_shaper/2

change_shaper(State::state(), Shaper::p1_shaper:state()) -> state()

close/1

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

close(Pid::state()) -> state()

close/2

close(Pid::pid(), Reason::atom()) -> ok

code_change/3

code_change(OldVsn::term(), State::state(), Extra::term()) -> {ok, state()} | {error, term()}

connect/1

connect(Ref::pid()) -> ok

establish/1

establish(State::state()) -> state()

format_error/1

format_error(Err::stop_reason()) -> binary()

get_transport/1

get_transport(X1) -> any()

handle_call/3

handle_call(Call::term(), From::term(), State::state()) -> next_state()

handle_cast/2

handle_cast(Cast::term(), State::state()) -> next_state()

handle_info/2

handle_info(Info::term(), State::state()) -> next_state()

init/1

init(X1::list()) -> {ok, state(), timeout()} | {stop, term()} | ignore

reply/2

reply(Ref, Reply) -> any()

send/2

send(Pid::pid(), Pkt::xmpp_element()) -> ok

send(Pid::state(), Pkt::xmpp_element()) -> state()

set_timeout/2

set_timeout(State::state(), Timeout::timeout()) -> state()

start/3

start(Mod, Args, Opts) -> any()

start_link/3

start_link(Mod, Args, Opts) -> any()

stop/1

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

stop(Pid::state()) -> no_return()

terminate/2

terminate(Reason::term(), State::state()) -> any()


Generated by EDoc