Fetching contributors…
Cannot retrieve contributors at this time
149 lines (85 sloc) 4.42 KB

Module hackney_ssl

Function Index

close/1Close a TCP socket.
connect/3
connect/4
controlling_process/2Assign a new controlling process Pid to Socket.
messages/1Atoms used to identify messages in {active, once | true} mode.
peername/1Return the address and port for the other end of a connection.
recv/2
recv/3Receive a packet from a socket in passive mode.
send/2Send a packet on a socket.
setopts/2Set one or more options for a socket.
shutdown/2Immediately close a socket in one or two directions.
sockname/1Get the local address and port of a socket.

Function Details

close/1


close(Socket::ssl:sslsocket()) -> ok


Close a TCP socket.

See also: ssl:close/1.

connect/3

connect(Host, Port, Opts) -> any()

connect/4

connect(Host, Port, Opts, Timeout) -> any()

controlling_process/2


controlling_process(Socket::ssl:sslsocket(), Pid::pid()) -> ok | {error, closed | not_owner | atom()}


Assign a new controlling process Pid to Socket.

See also: ssl:controlling_process/2.

messages/1

messages(X1) -> any()

Atoms used to identify messages in {active, once | true} mode.

peername/1


peername(Socket::ssl:sslsocket()) -> {ok, {inet:ip_address(), inet:port_number()}} | {error, atom()}


Return the address and port for the other end of a connection.

See also: ssl:peername/1.

recv/2

recv(Socket, Length) -> any()

recv/3


recv(Socket::ssl:sslsocket(), Length::non_neg_integer(), Timeout::timeout()) -> {ok, any()} | {error, closed | atom()}


Receive a packet from a socket in passive mode.

See also: ssl:recv/3.

send/2


send(Socket::ssl:sslsocket(), Packet::iolist()) -> ok | {error, atom()}


Send a packet on a socket.

See also: ssl:send/2.

setopts/2


setopts(Socket::ssl:sslsocket(), Opts::list()) -> ok | {error, atom()}


Set one or more options for a socket.

See also: ssl:setopts/2.

shutdown/2


shutdown(Socket::ssl:socket(), How::read | write | read_write) -> ok


Immediately close a socket in one or two directions.

See also: ssl:shutdown/2.

sockname/1


sockname(Socket::ssl:sslsocket()) -> {ok, {inet:ip_address(), inet:port_number()}} | {error, atom()}


Get the local address and port of a socket

See also: ssl:sockname/1.