open_unix(SocketPath, Opts) -> {ok, pid()} | {error, any()} SocketPath :: string() Opts :: gun:opts()
gun:open_unix - Open a connection to the given Unix domain socket
open_unix(SocketPath, Opts) -> {ok, pid()} | {error, any()} SocketPath :: string() Opts :: gun:opts()
Open a connection to the given Unix domain socket.
Path to the Unix domain socket to connect to.
Options for this connection.
The pid of the newly created Gun process is returned. Note that this does not indicate that the connection has been successfully opened; the gun_up(3) message will be sent for that.
{ok, ConnPid} = gun:open_unix("/var/run/dbus/system_bus_socket", #{}).
{ok, ConnPid} = gun:open_unix("/var/run/dbus/system_bus_socket", #{protocols => [http2]}).
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.