aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-11-12 11:12:56 +0100
committerLoïc Hoguin <[email protected]>2020-11-12 11:12:56 +0100
commit24f217ee8a45fbc89d4a7615dd0bd360fc839708 (patch)
tree31a82a03c03790ee9fc768a746328b45bf163186 /doc
parentd061c424b0a3ce39a0c3ff4a5eaade1af79d177e (diff)
downloadgun-24f217ee8a45fbc89d4a7615dd0bd360fc839708.tar.gz
gun-24f217ee8a45fbc89d4a7615dd0bd360fc839708.tar.bz2
gun-24f217ee8a45fbc89d4a7615dd0bd360fc839708.zip
Update gun_tunnel_up manual
It was missing the StreamRef from the message.
Diffstat (limited to 'doc')
-rw-r--r--doc/src/manual/gun_tunnel_up.asciidoc28
1 files changed, 13 insertions, 15 deletions
diff --git a/doc/src/manual/gun_tunnel_up.asciidoc b/doc/src/manual/gun_tunnel_up.asciidoc
index 5fc753e..41fbea8 100644
--- a/doc/src/manual/gun_tunnel_up.asciidoc
+++ b/doc/src/manual/gun_tunnel_up.asciidoc
@@ -4,39 +4,37 @@
gun_tunnel_up - The tunnel is up
-// @todo Update with StreamRef
-
== Description
[source,erlang]
----
-{gun_tunnel_up, ConnPid, Protocol}
+{gun_tunnel_up, ConnPid, StreamRef, Protocol}
-ConnPid :: pid()
-Protocol :: http | http2 | socks
+ConnPid :: pid()
+StreamRef :: gun:stream_ref() | undefined
+Protocol :: http | http2 | socks
----
-The Socks connection is up.
+The tunnel is up.
This message informs the owner/calling process that the connection
-completed through the configured Socks proxy.
+completed through the SOCKS or CONNECT proxy.
-If Gun is configured to connect to another Socks server, then the
+If Gun is configured to connect to another SOCKS server, then the
connection is not usable yet. One or more
link:man:gun_tunnel_up(3)[gun_tunnel_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.
-
== Elements
ConnPid::
The pid of the Gun connection process.
+StreamRef::
+
+The stream reference the tunnel is running on, or `undefined`
+if there are no underlying stream.
+
Protocol::
The protocol selected for this connection. It can be used
@@ -51,7 +49,7 @@ to determine the capabilities of the server.
.Receive a gun_tunnel_up message in a gen_server
[source,erlang]
----
-handle_info({gun_tunnel_up, ConnPid, _Protocol},
+handle_info({gun_tunnel_up, ConnPid, _StreamRef, _Protocol},
State=#state{conn_pid=ConnPid}) ->
%% Do something.
{noreply, State}.