Module ssl

Behaviours: gen_server.

Data Types

client_option()


client_option() = {server_name_indication, sni()} | {verify, verify_none}

host()


host() = hostname() | ip_address()

hostname()


hostname() = string()

ip_address()


ip_address() = inet:ip_address()

reason()


reason() = any()

sni()


sni() = hostname() | disabled

socket_option()


socket_option() = gen_tcp:connect_option() | gen_tcp:listen_option()

sslsocket()

abstract datatype: sslsocket()

tls_client_option()


tls_client_option() = client_option() | socket_option()

Function Index

close/1
connect/3
handle_call/3
handle_cast/2
handle_info/2
init/1
recv/2
send/2
start/0
stop/0
terminate/2

Function Details

close/1


close(X1::sslsocket()) -> ok

connect/3


connect(Host::host(), Port::inet:port_number(), TLSOptions::[tls_client_option()]) -> {ok, sslsocket()} | {error, reason()}

handle_call/3

handle_call(X1, From, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(Msg, State) -> any()

init/1

init(X1) -> any()

recv/2


recv(Socket::sslsocket(), Length::non_neg_integer()) -> ok | {error, reason()}

send/2


send(Socket::sslsocket(), Data::iodata()) -> ok | {error, reason()}

start/0


start() -> ok

stop/0


stop() -> ok

terminate/2

terminate(Reason, State) -> any()