diff options
author | Loïc Hoguin <[email protected]> | 2015-04-09 23:13:57 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-04-09 23:13:57 +0300 |
commit | a738db07c2040461f0fd431f04ecf90b157ead5b (patch) | |
tree | 3435489b45067c80fc7b7620cf02622676811c24 /doc/src/guide/connect.asciidoc | |
parent | 2badb594bdedfd1283306fe2075c2c51abdd600d (diff) | |
download | gun-a738db07c2040461f0fd431f04ecf90b157ead5b.tar.gz gun-a738db07c2040461f0fd431f04ecf90b157ead5b.tar.bz2 gun-a738db07c2040461f0fd431f04ecf90b157ead5b.zip |
Add gun_up and gun_down messages
The flush(Pid) function was enhanced to also discard Websocket
messages and the new up/down messages.
Diffstat (limited to 'doc/src/guide/connect.asciidoc')
-rw-r--r-- | doc/src/guide/connect.asciidoc | 14 |
1 files changed, 14 insertions, 0 deletions
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 |