View Source smtp_socket (gen_smtp v1.2.0)
Link to this section Summary
Functions
{inet_async,...} will be sent to current process when a client connects
handle the {inet_async,...} message
Upgrade a TCP connection to SSL
Link to this section Types
Specs
address() :: inet:ip_address() | string() | binary().
Specs
protocol() :: tcp | ssl.
Specs
socket() :: ssl:sslsocket() | gen_tcp:socket().
Link to this section Functions
Specs
Specs
Specs
active_once(Socket :: socket()) -> ok | {error, any()}.
Specs
begin_inet_async(Socket :: socket()) -> any().
Specs
close(Socket :: socket()) -> ok.
Specs
Specs
Specs
Specs
controlling_process(Socket :: socket(), NewOwner :: pid()) -> ok | {error, any()}.
Specs
extract_port_from_socket(Socket :: socket()) -> port().
Specs
get_proto(Socket :: any()) -> tcp | ssl.
Specs
handle the {inet_async,...} messageSpecs
Specs
Specs
Specs
Specs
peername(Socket :: socket()) -> {ok, {inet:ip_address(), non_neg_integer()}} | {error, any()}.
Specs
recv(Socket :: socket(), Length :: non_neg_integer()) -> {ok, any()} | {error, any()}.
Specs
recv(Socket :: socket(), Length :: non_neg_integer(), Timeout :: non_neg_integer() | infinity) -> {ok, any()} | {error, any()}.
Specs
send(Socket :: socket(), Data :: binary() | string() | iolist()) -> ok | {error, any()}.
Specs
setopts(Socket :: socket(), Options :: list()) -> ok | {error, any()}.
Specs
shutdown(Socket :: socket(), How :: read | write | read_write) -> ok | {error, any()}.
Specs
to_ssl_client(Socket :: socket()) -> {ok, ssl:sslsocket()} | {error, already_ssl}.
Specs
to_ssl_client(Socket :: socket(), Options :: list()) -> {ok, ssl:sslsocket()} | {error, already_ssl}.
Specs
to_ssl_client(Socket :: socket(), Options :: list(), Timeout :: non_neg_integer() | infinity) -> {ok, ssl:sslsocket()} | {error, already_ssl}.
Specs
to_ssl_server(Socket :: socket()) -> {ok, ssl:sslsocket()} | {error, any()}.
Specs
to_ssl_server(Socket :: socket(), Options :: list()) -> {ok, ssl:sslsocket()} | {error, any()}.
Specs
to_ssl_server(Socket :: socket(), Options :: list(), Timeout :: non_neg_integer() | infinity) -> {ok, ssl:sslsocket()} | {error, any()}.