From a738db07c2040461f0fd431f04ecf90b157ead5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Thu, 9 Apr 2015 23:13:57 +0300
Subject: Add gun_up and gun_down messages

The flush(Pid) function was enhanced to also discard Websocket
messages and the new up/down messages.
---
 doc/src/guide/connect.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'doc/src/guide/connect.asciidoc')

diff --git a/doc/src/guide/connect.asciidoc b/doc/src/guide/connect.asciidoc
index e2bcaa7..8de8184 100644
--- a/doc/src/guide/connect.asciidoc
+++ b/doc/src/guide/connect.asciidoc
@@ -52,6 +52,20 @@ form of a map.
 [source,erlang]
 {ok, ConnPid} = gun:open("example.org", 8443, #{transport=>ssl}).
 
+=== Connection up and down messages
+
+When Gun successfully connects to the server, it sends a
+`gun_up` message with the protocol that has been selected
+for the connection.
+
+When the connection is lost, Gun will send a `gun_down`
+message indicating the current protocol, the reason the
+connection was lost and two list of stream references.
+
+The first list indicates open streams that _may_ have been
+processed by the server. The second list indicates open
+streams that the server did not process.
+
 === Monitoring the connection process
 
 @todo Gun should detect the owner process being killed
-- 
cgit v1.2.3

