View Source hackney_http_connect (hackney v1.23.0)
Summary
Functions
Close a socks5 socket.
See also: gen_tcp:close/1.
Assign a new controlling process Pid to Socket.
See also: gen_tcp:controlling_process/2.
Atoms used to identify messages in {active, once | true} mode.
Return the address and port for the other end of a connection.
See also: inet:peername/1.
Receive a packet from a socket in passive mode.
See also: gen_tcp:recv/3.
Send a packet on a socket.
See also: gen_tcp:send/2.
Set one or more options for a socket.
See also: inet:setopts/2.
Immediately close a socket in one or two directions.
See also: gen_tcp:shutdown/2.
Get the local address and port of a socket
See also: inet:sockname/1.
Types
-type http_socket() :: {atom(), inet:socket()}.
Functions
-spec close(http_socket()) -> ok.
See also: gen_tcp:close/1.
-spec controlling_process(http_socket(), pid()) -> ok | {error, closed | not_owner | atom()}.
See also: gen_tcp:controlling_process/2.
-spec peername(http_socket()) -> {ok, {inet:ip_address(), inet:port_number()}} | {error, atom()}.
See also: inet:peername/1.
-spec recv(http_socket(), non_neg_integer(), timeout()) -> {ok, any()} | {error, closed | atom()}.
See also: gen_tcp:recv/3.
-spec send(http_socket(), iolist()) -> ok | {error, atom()}.
See also: gen_tcp:send/2.
-spec setopts(http_socket(), list()) -> ok | {error, atom()}.
See also: inet:setopts/2.
-spec shutdown(http_socket(), read | write | read_write) -> ok.
See also: gen_tcp:shutdown/2.
-spec sockname(http_socket()) -> {ok, {inet:ip_address(), inet:port_number()}} | {error, atom()}.
See also: inet:sockname/1.