From 24f217ee8a45fbc89d4a7615dd0bd360fc839708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 12 Nov 2020 11:12:56 +0100 Subject: Update gun_tunnel_up manual It was missing the StreamRef from the message. --- doc/src/manual/gun_tunnel_up.asciidoc | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'doc') 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}. -- cgit v1.2.3