From 37b771210f94b9b692d0417d79483b9927d46ba2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Sun, 22 Sep 2019 15:04:37 +0200
Subject: Document Socks support

Also correct various Socks related types. This commit also
adds a new gun:protocols/0 type as a simpler way of describing
preferred protocols. The protocol/opts tuple is also documented.

This commit also fixes an issue with the default value for the
preferred protocols when using CONNECT over TLS. It was
mistakenly not enabling http2 by default.
---
 doc/src/manual/gun_up.asciidoc | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'doc/src/manual/gun_up.asciidoc')

diff --git a/doc/src/manual/gun_up.asciidoc b/doc/src/manual/gun_up.asciidoc
index a103594..db09fca 100644
--- a/doc/src/manual/gun_up.asciidoc
+++ b/doc/src/manual/gun_up.asciidoc
@@ -11,7 +11,7 @@ gun_up - The connection is up
 {gun_up, ConnPid, Protocol}
 
 ConnPid  :: pid()
-Protocol :: http | http2
+Protocol :: http | http2 | socks
 ----
 
 The connection is up.
@@ -19,16 +19,16 @@ The connection is up.
 This message informs the owner process that the connection or
 reconnection completed.
 
-Gun will now start processing the messages it received while
+If Gun is configured to connect to a Socks server, then the
+connection is not usable yet. One or more
+link:man:gun_socks_up(3)[gun_socks_up(3)] messages will follow.
+
+Otherwise, Gun will start processing the messages it received while
 waiting for the connection to be up. If this is a reconnection,
 then this may not be desirable for all requests. Those requests
 should be cancelled when the connection goes down, and any
 subsequent messages ignored.
 
-// @todo Gun doesn't process messages immediately if it
-// is using the socks protocol, there are gun_socks_connected
-// messages coming up before reaching HTTP.
-
 == Elements
 
 ConnPid::
@@ -61,5 +61,6 @@ link:man:gun(3)[gun(3)],
 link:man:gun:open(3)[gun:open(3)],
 link:man:gun:open_unix(3)[gun:open_unix(3)],
 link:man:gun:await_up(3)[gun:await_up(3)],
+link:man:gun_socks_up(3)[gun_socks_up(3)],
 link:man:gun_down(3)[gun_down(3)],
 link:man:gun_error(3)[gun_error(3)]
-- 
cgit v1.2.3

