From 5b810c924da242632a04a2c44772cb892aa1b7c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Sat, 2 Jun 2018 22:44:16 +0200
Subject: Revamp the manual, one page per function/message

---
 doc/src/manual/gun.open_unix.asciidoc | 60 +++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 doc/src/manual/gun.open_unix.asciidoc

(limited to 'doc/src/manual/gun.open_unix.asciidoc')

diff --git a/doc/src/manual/gun.open_unix.asciidoc b/doc/src/manual/gun.open_unix.asciidoc
new file mode 100644
index 0000000..225ecc8
--- /dev/null
+++ b/doc/src/manual/gun.open_unix.asciidoc
@@ -0,0 +1,60 @@
+= gun:open_unix(3)
+
+== Name
+
+gun:open_unix - Open a connection to the given Unix domain socket
+
+== Description
+
+[source,erlang]
+----
+open_unix(SocketPath, Opts) -> {ok, pid()} | {error, any()}
+
+SocketPath :: string()
+Opts       :: gun:opts()
+----
+
+Open a connection to the given Unix domain socket.
+
+== Arguments
+
+SocketPath::
+
+Path to the Unix domain socket to connect to.
+
+Opts::
+
+Options for this connection.
+
+== Return value
+
+The pid of the newly created Gun process is returned.
+Note that this does not indicate that the connection
+has been successfully opened; the link:man:gun_up(3)[gun_up(3)]
+message will be sent for that.
+
+== Changelog
+
+* *1.0*: Function introduced.
+
+== Examples
+
+.Connect to a server via a Unix domain socket
+[source,erlang]
+----
+{ok, ConnPid} = gun:open_unix("/var/run/dbus/system_bus_socket", #{}).
+----
+
+.Connect to a server via a Unix domain socket with custom options
+[source,erlang]
+----
+{ok, ConnPid} = gun:open_unix("/var/run/dbus/system_bus_socket",
+    #{protocols => [http2]}).
+----
+
+== See also
+
+link:man:gun(3)[gun(3)],
+link:man:gun:open(3)[gun:open(3)],
+link:man:gun:await_up(3)[gun:await_up(3)],
+link:man:gun_up(3)[gun_up(3)]
-- 
cgit v1.2.3

