From 2c8db0879109dd90443d7b276e5ca2daf83920bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 20 Aug 2020 16:06:59 +0200 Subject: Rename the 3-arity gun_socks_up to gun_tunnel_up --- doc/src/manual/gun.asciidoc | 2 +- doc/src/manual/gun.await_up.asciidoc | 2 +- doc/src/manual/gun.open.asciidoc | 2 +- doc/src/manual/gun.open_unix.asciidoc | 2 +- doc/src/manual/gun_down.asciidoc | 2 +- doc/src/manual/gun_error.asciidoc | 2 +- doc/src/manual/gun_socks_up.asciidoc | 66 ---------------------------------- doc/src/manual/gun_tunnel_up.asciidoc | 68 +++++++++++++++++++++++++++++++++++ doc/src/manual/gun_up.asciidoc | 4 +-- 9 files changed, 76 insertions(+), 74 deletions(-) delete mode 100644 doc/src/manual/gun_socks_up.asciidoc create mode 100644 doc/src/manual/gun_tunnel_up.asciidoc (limited to 'doc') diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc index 2067d96..a2d51f6 100644 --- a/doc/src/manual/gun.asciidoc +++ b/doc/src/manual/gun.asciidoc @@ -64,7 +64,7 @@ by sending any of the following messages: Connection: * link:man:gun_up(3)[gun_up(3)] - The connection is up -* link:man:gun_socks_up(3)[gun_socks_up(3)] - The Socks connection is up +* link:man:gun_tunnel_up(3)[gun_tunnel_up(3)] - The tunnel is up * link:man:gun_down(3)[gun_down(3)] - The connection is down * link:man:gun_upgrade(3)[gun_upgrade(3)] - Successful protocol upgrade * link:man:gun_error(3)[gun_error(3)] - Stream or connection-wide error diff --git a/doc/src/manual/gun.await_up.asciidoc b/doc/src/manual/gun.await_up.asciidoc index d9934b5..ffe39fd 100644 --- a/doc/src/manual/gun.await_up.asciidoc +++ b/doc/src/manual/gun.await_up.asciidoc @@ -71,5 +71,5 @@ may also be returned when a timeout or an error occur. 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_socks_up(3)[gun_socks_up(3)], +link:man:gun_tunnel_up(3)[gun_tunnel_up(3)], link:man:gun_up(3)[gun_up(3)] diff --git a/doc/src/manual/gun.open.asciidoc b/doc/src/manual/gun.open.asciidoc index 63bb3f8..57d4490 100644 --- a/doc/src/manual/gun.open.asciidoc +++ b/doc/src/manual/gun.open.asciidoc @@ -73,5 +73,5 @@ message will be sent for that. link:man:gun(3)[gun(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_tunnel_up(3)[gun_tunnel_up(3)], link:man:gun_up(3)[gun_up(3)] diff --git a/doc/src/manual/gun.open_unix.asciidoc b/doc/src/manual/gun.open_unix.asciidoc index 441bfa8..0063728 100644 --- a/doc/src/manual/gun.open_unix.asciidoc +++ b/doc/src/manual/gun.open_unix.asciidoc @@ -61,5 +61,5 @@ message will be sent for that. 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_socks_up(3)[gun_socks_up(3)], +link:man:gun_tunnel_up(3)[gun_tunnel_up(3)], link:man:gun_up(3)[gun_up(3)] diff --git a/doc/src/manual/gun_down.asciidoc b/doc/src/manual/gun_down.asciidoc index 6785cb5..a9fabde 100644 --- a/doc/src/manual/gun_down.asciidoc +++ b/doc/src/manual/gun_down.asciidoc @@ -75,5 +75,5 @@ 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_up(3)[gun_up(3)], -link:man:gun_socks_up(3)[gun_socks_up(3)], +link:man:gun_tunnel_up(3)[gun_tunnel_up(3)], link:man:gun_error(3)[gun_error(3)] diff --git a/doc/src/manual/gun_error.asciidoc b/doc/src/manual/gun_error.asciidoc index ac278fd..800b49c 100644 --- a/doc/src/manual/gun_error.asciidoc +++ b/doc/src/manual/gun_error.asciidoc @@ -64,5 +64,5 @@ handle_info({gun_error, ConnPid, _StreamRef, _Reason}, link:man:gun(3)[gun(3)], link:man:gun_up(3)[gun_up(3)], -link:man:gun_socks_up(3)[gun_socks_up(3)], +link:man:gun_tunnel_up(3)[gun_tunnel_up(3)], link:man:gun_down(3)[gun_down(3)] diff --git a/doc/src/manual/gun_socks_up.asciidoc b/doc/src/manual/gun_socks_up.asciidoc deleted file mode 100644 index e65cbff..0000000 --- a/doc/src/manual/gun_socks_up.asciidoc +++ /dev/null @@ -1,66 +0,0 @@ -= gun_socks_up(3) - -== Name - -gun_socks_up - The Socks connection is up - -== Description - -[source,erlang] ----- -{gun_socks_up, ConnPid, Protocol} - -ConnPid :: pid() -Protocol :: http | http2 | socks ----- - -The Socks connection is up. - -This message informs the owner/calling process that the connection -completed through the configured Socks proxy. - -If Gun is configured to connect to another 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. - -== Elements - -ConnPid:: - -The pid of the Gun connection process. - -Protocol:: - -The protocol selected for this connection. It can be used -to determine the capabilities of the server. - -== Changelog - -* *2.0*: Message introduced. - -== Examples - -.Receive a gun_socks_up message in a gen_server -[source,erlang] ----- -handle_info({gun_socks_up, ConnPid, _Protocol}, - State=#state{conn_pid=ConnPid}) -> - %% Do something. - {noreply, State}. ----- - -== See also - -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_up(3)[gun_up(3)], -link:man:gun_down(3)[gun_down(3)], -link:man:gun_error(3)[gun_error(3)] diff --git a/doc/src/manual/gun_tunnel_up.asciidoc b/doc/src/manual/gun_tunnel_up.asciidoc new file mode 100644 index 0000000..5fc753e --- /dev/null +++ b/doc/src/manual/gun_tunnel_up.asciidoc @@ -0,0 +1,68 @@ += gun_tunnel_up(3) + +== Name + +gun_tunnel_up - The tunnel is up + +// @todo Update with StreamRef + +== Description + +[source,erlang] +---- +{gun_tunnel_up, ConnPid, Protocol} + +ConnPid :: pid() +Protocol :: http | http2 | socks +---- + +The Socks connection is up. + +This message informs the owner/calling process that the connection +completed through the configured Socks proxy. + +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. + +Protocol:: + +The protocol selected for this connection. It can be used +to determine the capabilities of the server. + +== Changelog + +* *2.0*: Message introduced. + +== Examples + +.Receive a gun_tunnel_up message in a gen_server +[source,erlang] +---- +handle_info({gun_tunnel_up, ConnPid, _Protocol}, + State=#state{conn_pid=ConnPid}) -> + %% Do something. + {noreply, State}. +---- + +== See also + +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_up(3)[gun_up(3)], +link:man:gun_down(3)[gun_down(3)], +link:man:gun_error(3)[gun_error(3)] diff --git a/doc/src/manual/gun_up.asciidoc b/doc/src/manual/gun_up.asciidoc index db09fca..3853afd 100644 --- a/doc/src/manual/gun_up.asciidoc +++ b/doc/src/manual/gun_up.asciidoc @@ -21,7 +21,7 @@ reconnection completed. 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. +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, @@ -61,6 +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_tunnel_up(3)[gun_tunnel_up(3)], link:man:gun_down(3)[gun_down(3)], link:man:gun_error(3)[gun_error(3)] -- cgit v1.2.3