From 2b588340af501825f3ab03f2e76dba0353c98fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 4 Jun 2018 12:59:26 +0200 Subject: Update documentation for Gun 1.0 --- docs/en/gun/1.0/manual/gun_down/index.html | 256 +++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 docs/en/gun/1.0/manual/gun_down/index.html (limited to 'docs/en/gun/1.0/manual/gun_down/index.html') diff --git a/docs/en/gun/1.0/manual/gun_down/index.html b/docs/en/gun/1.0/manual/gun_down/index.html new file mode 100644 index 00000000..ddc7c7e1 --- /dev/null +++ b/docs/en/gun/1.0/manual/gun_down/index.html @@ -0,0 +1,256 @@ + + + + + + + + + + Nine Nines: gun_down(3) + + + + + + + + + + + + + + + + +
+
+
+
+ +

gun_down(3)

+ +
+

Name

+
+

gun_down - The connection is down

+
+
+
+

Description

+
+
+
+
{gun_down, ConnPid, Protocol, Reason, KilledStreams, UnprocessedStreams}
+
+ConnPid            :: pid()
+Protocol           :: http | http2 | ws
+Reason             :: any()
+KilledStreams      :: [reference()]
+UnprocessedStreams :: [reference()]
+

The connection is down.

+

This message informs the owner process that the connection +was lost. Depending on the retry and retry_timeout +options Gun may automatically attempt to reconnect.

+

When the connection goes back up, Gun will not attempt to retry +requests. It will also not upgrade to Websocket automatically +if that was the protocol in use when the connection was lost.

+
+
+
+

Elements

+
+
+
+ConnPid +
+
+

+The pid of the Gun connection process. +

+
+
+Protocol +
+
+

+The protocol that was selected for this connection +or upgraded to during the course of the connection. +

+
+
+Reason +
+
+

+The reason for the loss of the connection. +

+

It is present for debugging purposes only. You should not +rely on this value to perform operations programmatically.

+
+
+KilledStreams +
+
+

+List of streams that have been brutally terminated. +

+

They are active streams that did not complete before the closing +of the connection. Whether they can be retried safely depends +on the protocol used and the idempotence property of the requests.

+
+
+UnprocessedStreams +
+
+

+List of streams that have not been processed by the server. +

+

They are streams that the server did not start processing yet. +They may be retried safely depending on whether related streams +were killed.

+
+
+
+
+
+

Changelog

+
+
    +
  • +

    +1.0: Message introduced. +

    +
  • +
+
+
+
+

Examples

+
+
+
Receive a gun_down message in a gen_server
+
+
handle_info({gun_down, ConnPid, _Protocol,
+             _Reason, _Killed, _Unprocessed},
+            State=#state{conn_pid=ConnPid}) ->
+    %% Do something.
+    {noreply, State}.
+
+
+ + + + + + +
+ +
+ + +

+ Gun + 1.0 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+
    + + + +
  • 1.0
  • + +
+ +
+
+
+
+ + + + + + + + + -- cgit v1.2.3