summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-11-16 16:12:55 +0100
committerLoïc Hoguin <[email protected]>2020-11-16 16:12:55 +0100
commit7d61b485e47e247d7ecac500c83a902ab934f569 (patch)
treee704c44ee5ede186ade88d36b742fb0854805e1c
parent90e4885d7ca8e9d4a5e18f898fc172da900015c5 (diff)
downloadninenines.eu-7d61b485e47e247d7ecac500c83a902ab934f569.tar.gz
ninenines.eu-7d61b485e47e247d7ecac500c83a902ab934f569.tar.bz2
ninenines.eu-7d61b485e47e247d7ecac500c83a902ab934f569.zip
Update documentation
-rw-r--r--_build/data/projects/cowlib.toml4
-rw-r--r--_build/data/projects/ranch.toml2
-rw-r--r--docs/en/cowlib/2.10/manual/cow_cookie.cookie/index.html184
-rw-r--r--docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/index.html186
-rw-r--r--docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/index.html193
-rw-r--r--docs/en/cowlib/2.10/manual/cow_cookie.setcookie/index.html194
-rw-r--r--docs/en/cowlib/2.10/manual/cow_cookie/index.html228
-rw-r--r--docs/en/cowlib/2.10/manual/cowlib_app/index.html175
-rw-r--r--docs/en/cowlib/2.10/manual/index.html175
-rw-r--r--docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/index.html2
-rw-r--r--docs/en/cowlib/2.8/manual/cow_cookie.setcookie/index.html2
-rw-r--r--docs/en/cowlib/2.8/manual/cow_cookie/index.html2
-rw-r--r--docs/en/cowlib/2.8/manual/cowlib_app/index.html2
-rw-r--r--docs/en/cowlib/2.8/manual/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/cow_cookie.cookie/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/cow_cookie.parse_cookie/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/cow_cookie.setcookie/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/cow_cookie/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/cowlib_app/index.html2
-rw-r--r--docs/en/cowlib/2.9/manual/index.html2
-rw-r--r--docs/en/gun/2.0/guide/index.html4
-rw-r--r--docs/en/gun/2.0/guide/internals_tls_over_tls.asciidoc177
-rw-r--r--docs/en/gun/2.0/guide/internals_tls_over_tls/index.html221
-rw-r--r--docs/en/gun/2.0/guide/introduction.asciidoc2
-rw-r--r--docs/en/gun/2.0/guide/introduction/index.html2
-rw-r--r--docs/en/gun/2.0/guide/migrating_from_1.3.asciidoc75
-rw-r--r--docs/en/gun/2.0/guide/migrating_from_1.3/index.html45
-rw-r--r--docs/en/gun/2.0/guide/protocols.asciidoc17
-rw-r--r--docs/en/gun/2.0/guide/protocols/index.html8
-rw-r--r--docs/en/gun/2.0/guide/websocket.asciidoc8
-rw-r--r--docs/en/gun/2.0/guide/websocket/index.html12
-rw-r--r--docs/en/gun/2.0/manual/gun.await/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.await_body/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.await_up/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.cancel/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.connect/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.data/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.delete/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.flush/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.get/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.head/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.headers/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.info/index.html5
-rw-r--r--docs/en/gun/2.0/manual/gun.open/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.open_unix/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.options/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.patch/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.post/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.put/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.request/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.stream_info/index.html24
-rw-r--r--docs/en/gun/2.0/manual/gun.update_flow/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun.ws_send/index.html28
-rw-r--r--docs/en/gun/2.0/manual/gun.ws_upgrade/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun/index.html66
-rw-r--r--docs/en/gun/2.0/manual/gun_app/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun_data/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun_down/index.html4
-rw-r--r--docs/en/gun/2.0/manual/gun_error/index.html4
-rw-r--r--docs/en/gun/2.0/manual/gun_event/index.html573
-rw-r--r--docs/en/gun/2.0/manual/gun_inform/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun_push/index.html4
-rw-r--r--docs/en/gun/2.0/manual/gun_response/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun_trailers/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun_tunnel_up/index.html (renamed from docs/en/gun/2.0/manual/gun_socks_up/index.html)27
-rw-r--r--docs/en/gun/2.0/manual/gun_up/index.html4
-rw-r--r--docs/en/gun/2.0/manual/gun_upgrade/index.html2
-rw-r--r--docs/en/gun/2.0/manual/gun_ws/index.html2
-rw-r--r--docs/en/gun/2.0/manual/index.html2
-rw-r--r--docs/index.html5
-rw-r--r--docs/index.xml273
-rw-r--r--donate/index.html18
-rw-r--r--erlanger-playbook/index.html18
-rw-r--r--index.html20
-rw-r--r--index.xml273
-rw-r--r--services/index.html18
-rw-r--r--sitemap.xml62
78 files changed, 3087 insertions, 331 deletions
diff --git a/_build/data/projects/cowlib.toml b/_build/data/projects/cowlib.toml
index a28a4569..43a8a012 100644
--- a/_build/data/projects/cowlib.toml
+++ b/_build/data/projects/cowlib.toml
@@ -3,7 +3,7 @@ catchphrase = "Support library for the Web."
description = "The Web toolbox for HTTP/1.1, HTTP/2, Websocket, Multipart, Cookies, URL encoding..."
name = "cowlib"
repository = "https://github.com/ninenines/cowlib"
-versions = ["2.9", "2.8"]
-branches = ["2.9.0", "2.8.0"]
+versions = ["2.10", "2.9", "2.8"]
+branches = ["master", "2.9.1", "2.8.0"]
has_source = true
has_manual = true
diff --git a/_build/data/projects/ranch.toml b/_build/data/projects/ranch.toml
index ab1fe4ea..8523bf32 100644
--- a/_build/data/projects/ranch.toml
+++ b/_build/data/projects/ranch.toml
@@ -4,7 +4,7 @@ description = "Ranch is a socket acceptor pool for building awesome TCP and TLS
name = "ranch"
repository = "https://github.com/ninenines/ranch"
versions = ["2.0", "1.7", "1.6", "1.5", "1.4"]
-branches = ["master", "1.7.1", "1.6.2", "1.5.0", "1.4.0"]
+branches = ["2.0.0", "1.7.1", "1.6.2", "1.5.0", "1.4.0"]
has_source = true
has_guide = true
has_manual = true
diff --git a/docs/en/cowlib/2.10/manual/cow_cookie.cookie/index.html b/docs/en/cowlib/2.10/manual/cow_cookie.cookie/index.html
new file mode 100644
index 00000000..efe5007b
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/cow_cookie.cookie/index.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: cow_cookie:cookie(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cow_cookie:cookie(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cow_cookie:cookie - Generate a cookie header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">cookie</font></b>(<font color="#009900">Cookies</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">iolist</font></b>()
+
+<font color="#009900">Cookies</font> <font color="#990000">::</font> [{<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()}]</tt></pre>
+</div></div>
+<p>Generate a cookie header.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Cookies</dt>
+<dd><p>A list of pairs of cookie name and value.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An iolist with the generated cookie header value.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.9</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Generate a cookie header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">Cookie</font> <font color="#990000">=</font> <b><font color="#000000">cow_cookie:cookie</font></b>([{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">ID</font>}])<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../cow_cookie">cow_cookie(3)</a>, <a href="../cow_cookie.parse_cookie">cow_cookie:parse_cookie(3)</a>, <a href="../cow_cookie.parse_set_cookie">cow_cookie:parse_set_cookie(3)</a>, <a href="../cow_cookie.setcookie">cow_cookie:setcookie(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/index.html b/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/index.html
new file mode 100644
index 00000000..2ae54bd4
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/index.html
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: cow_cookie:parse_cookie(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cow_cookie:parse_cookie(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cow_cookie:parse_cookie - Parse a cookie header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">parse_cookie</font></b>(<font color="#009900">Cookie</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>())
+ <font color="#990000">-&gt;</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Parse a cookie header.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Cookie</dt>
+<dd><p>The cookie header value.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>A list of cookie name/value pairs is returned on success.</p>
+<p>An exception is thrown in the event of a parse error.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.9</strong>: Fixes to the parser may lead to potential incompatibilities. A cookie name starting with <code>$</code> is no longer ignored. A cookie without a <code>=</code> will be parsed as the value of the cookie named <code>&lt;&lt;&gt;&gt;</code> (empty name).
+</li>
+<li><strong>1.0</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Parse a cookie header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cow_cookie:parse_cookie</font></b>(<font color="#009900">CookieHd</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../cow_cookie">cow_cookie(3)</a>, <a href="../cow_cookie.parse_set_cookie">cow_cookie:parse_set_cookie(3)</a>, <a href="../cow_cookie.cookie">cow_cookie:cookie(3)</a>, <a href="../cow_cookie.setcookie">cow_cookie:setcookie(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/index.html b/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/index.html
new file mode 100644
index 00000000..6b567160
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/index.html
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: cow_cookie:parse_set_cookie(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cow_cookie:parse_set_cookie(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cow_cookie:parse_set_cookie - Parse a set-cookie header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">parse_set_cookie</font></b>(<font color="#009900">SetCookie</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Attrs</font>} | <font color="#FF6600">ignore</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Attrs</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_attrs</font></b>()</tt></pre>
+</div></div>
+<p>Parse a set-cookie header.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>SetCookie</dt>
+<dd><p>The set-cookie header value.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An <code>ok</code> tuple with the cookie name, value and attributes is returned on success.</p>
+<p>An atom <code>ignore</code> is returned when the cookie has both an empty name and an empty value, and must be ignored.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.9</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Parse a cookie header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">cow_cookie:parse_set_cookie</font></b>(<font color="#009900">SetCookieHd</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Attrs</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cookie_engine_set_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Attrs</font>);
+ <font color="#FF6600">ignore</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">do_nothing</font></b>()
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../cow_cookie">cow_cookie(3)</a>, <a href="../cow_cookie.parse_cookie">cow_cookie:parse_cookie(3)</a>, <a href="../cow_cookie.cookie">cow_cookie:cookie(3)</a>, <a href="../cow_cookie.setcookie">cow_cookie:setcookie(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/index.html b/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/index.html
new file mode 100644
index 00000000..f7bae2f8
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/index.html
@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: cow_cookie:setcookie(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cow_cookie:setcookie(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cow_cookie:setcookie - Generate a set-cookie header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">setcookie</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>(),
+ <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>(),
+ <font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_opts</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a set-cookie header.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Name</dt>
+<dd><p>Cookie name.</p>
+</dd>
+<dt>Value</dt>
+<dd><p>Cookie value.</p>
+</dd>
+<dt>Opts</dt>
+<dd><p>Options added to the set-cookie header as attributes.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An iolist with the generated set-cookie header value.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.0</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Generate a set-cookie header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">SetCookie</font> <font color="#990000">=</font> <b><font color="#000000">cow_cookie:setcookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">ID</font>, #{
+ <font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>,
+ <font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../cow_cookie">cow_cookie(3)</a>, <a href="../cow_cookie.parse_cookie">cow_cookie:parse_cookie(3)</a>, <a href="../cow_cookie.parse_set_cookie">cow_cookie:parse_set_cookie(3)</a>, <a href="../cow_cookie.cookie">cow_cookie:cookie(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.10/manual/cow_cookie/index.html b/docs/en/cowlib/2.10/manual/cow_cookie/index.html
new file mode 100644
index 00000000..8f2674cd
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/cow_cookie/index.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: cow_cookie(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cow_cookie(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cow_cookie - Cookies</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>cow_cookie</code> provides functions for parsing and manipulating cookie headers.</p>
+<h2 id="_exports">Exports</h2>
+<ul><li><a href="../cow_cookie.parse_cookie">cow_cookie:parse_cookie(3)</a> - Parse a cookie header
+</li>
+<li><a href="../cow_cookie.parse_set_cookie">cow_cookie:parse_set_cookie(3)</a> - Parse a set-cookie header
+</li>
+<li><a href="../cow_cookie.cookie">cow_cookie:cookie(3)</a> - Generate a cookie header
+</li>
+<li><a href="../cow_cookie.setcookie">cow_cookie:setcookie(3)</a> - Generate a set-cookie header
+</li>
+</ul>
+<h2 id="_types">Types</h2>
+<h3 id="_cookie_attrs">cookie_attrs()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">cookie_attrs</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">expires</font> <font color="#990000">=&gt;</font> <b><font color="#000000">calendar:datetime</font></b>(),
+ <font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <b><font color="#000000">calendar:datetime</font></b>(),
+ <font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>,
+ <font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>,
+ <font color="#0000FF">same_site</font> <font color="#990000">=&gt;</font> <font color="#FF6600">strict</font> | <font color="#FF6600">lax</font> | <font color="#FF6600">none</font>
+}</tt></pre>
+</div></div>
+<p>Cookie attributes parsed from the set-cookie header. The attributes must be passed as-is to a cookie store engine for processing, along with the cookie name and value. More information about the attributes can be found in <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>.</p>
+<h3 id="_cookie_opts">cookie_opts()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">cookie_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#0000FF">same_site</font> <font color="#990000">=&gt;</font> <font color="#FF6600">strict</font> | <font color="#FF6600">lax</font> | <font color="#FF6600">none</font>,
+ <font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>()
+}</tt></pre>
+</div></div>
+<p>Options for the set-cookie header. They are added to the header as attributes. More information about the options can be found in <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>.</p>
+<p>The following options are defined:</p>
+<dl><dt>domain</dt>
+<dd><p>Hosts to which the cookie will be sent. By default it will only be sent to the origin server.</p>
+</dd>
+<dt>http_only</dt>
+<dd><p>Whether the cookie should be restricted to HTTP requests, or it should also be exposed to other APIs, for example Javascript. By default there are no restrictions.</p>
+</dd>
+<dt>max_age</dt>
+<dd><p>Maximum lifetime of the cookie, in seconds. By default the cookie is kept for the duration of the session.</p>
+</dd>
+<dt>path</dt>
+<dd><p>Path to which the cookie will be sent. By default it will be sent to the current &quot;directory&quot; of the effective request URI.</p>
+</dd>
+<dt>same_site</dt>
+<dd><p>Whether the cookie should be sent along with cross-site requests. This attribute is currently non-standard but is in the process of being standardized. Please refer to the <a href="https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7">RFC 6265 (bis) draft</a> for details.</p>
+<p>The default value for this attribute may vary depending on user agent and configuration. Browsers are known to be more strict over TCP compared to TLS.</p>
+</dd>
+<dt>secure</dt>
+<dd><p>Whether the cookie should be sent only on secure channels (for example TLS). Note that this does not guarantee the integrity of the cookie, only its confidentiality during transfer. By default there are no restrictions.</p>
+</dd>
+</dl>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.10</strong>: The <code>same_site</code> attribute and option may now be set to <code>none</code>.
+</li>
+<li><strong>2.9</strong>: The <code>cookie_attrs</code> type was added.
+</li>
+<li><strong>1.0</strong>: Module introduced.
+</li>
+</ul>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">cowlib(7)</a>, <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.10/manual/cowlib_app/index.html b/docs/en/cowlib/2.10/manual/cowlib_app/index.html
new file mode 100644
index 00000000..e5046781
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/cowlib_app/index.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: cowlib(7)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowlib(7)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cowlib - Support library for manipulating Web protocols</p>
+<h2 id="_description">Description</h2>
+<p>Cowlib provides libraries for parsing and building messages for various Web protocols, including HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is optimized for completeness rather than speed. No value is ignored, they are all returned.</p>
+<h2 id="_modules">Modules</h2>
+<ul><li><a href="../cow_cookie">cow_cookie(3)</a> - Cookies
+</li>
+</ul>
+<h2 id="_dependencies">Dependencies</h2>
+<ul><li>crypto - Crypto functions
+</li>
+</ul>
+<p>All these applications must be started before the <code>cowlib</code> application. To start Cowlib and all dependencies at once:</p>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowlib</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_environment">Environment</h2>
+<p>The <code>cowlib</code> application does not define any application environment configuration parameters.</p>
+<h2 id="_see_also">See also</h2>
+<p><a href="../cowboy">cowboy(7)</a>, <a href="../gun">gun(7)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.10/manual/index.html b/docs/en/cowlib/2.10/manual/index.html
new file mode 100644
index 00000000..595b7d44
--- /dev/null
+++ b/docs/en/cowlib/2.10/manual/index.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Cowlib Function Reference</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Cowlib Function Reference</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>cowlib - Support library for manipulating Web protocols</p>
+<h2 id="_description">Description</h2>
+<p>Cowlib provides libraries for parsing and building messages for various Web protocols, including HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is optimized for completeness rather than speed. No value is ignored, they are all returned.</p>
+<h2 id="_modules">Modules</h2>
+<ul><li><a href="cow_cookie">cow_cookie(3)</a> - Cookies
+</li>
+</ul>
+<h2 id="_dependencies">Dependencies</h2>
+<ul><li>crypto - Crypto functions
+</li>
+</ul>
+<p>All these applications must be started before the <code>cowlib</code> application. To start Cowlib and all dependencies at once:</p>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowlib</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_environment">Environment</h2>
+<p>The <code>cowlib</code> application does not define any application environment configuration parameters.</p>
+<h2 id="_see_also">See also</h2>
+<p><a href="cowboy_app">cowboy(7)</a>, <a href="gun_app">gun(7)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowlib
+ 2.10
+ Function Reference
+
+</h3>
+
+<ul>
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
+ <li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
+
+ <li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/index.html b/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/index.html
index cfb7dabe..ff63219c 100644
--- a/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/index.html
+++ b/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/index.html
@@ -128,6 +128,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/index.html b/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/index.html
index 9c12c18d..583a59d4 100644
--- a/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/index.html
+++ b/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/index.html
@@ -138,6 +138,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.8/manual/cow_cookie/index.html b/docs/en/cowlib/2.8/manual/cow_cookie/index.html
index 6ab9cda6..d2b38825 100644
--- a/docs/en/cowlib/2.8/manual/cow_cookie/index.html
+++ b/docs/en/cowlib/2.8/manual/cow_cookie/index.html
@@ -143,6 +143,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.8/manual/cowlib_app/index.html b/docs/en/cowlib/2.8/manual/cowlib_app/index.html
index 75322d42..7b81913e 100644
--- a/docs/en/cowlib/2.8/manual/cowlib_app/index.html
+++ b/docs/en/cowlib/2.8/manual/cowlib_app/index.html
@@ -119,6 +119,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.8/manual/index.html b/docs/en/cowlib/2.8/manual/index.html
index 587d783f..ca73082e 100644
--- a/docs/en/cowlib/2.8/manual/index.html
+++ b/docs/en/cowlib/2.8/manual/index.html
@@ -119,6 +119,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/cow_cookie.cookie/index.html b/docs/en/cowlib/2.9/manual/cow_cookie.cookie/index.html
index c18b41a4..99c5d67e 100644
--- a/docs/en/cowlib/2.9/manual/cow_cookie.cookie/index.html
+++ b/docs/en/cowlib/2.9/manual/cow_cookie.cookie/index.html
@@ -128,6 +128,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/cow_cookie.parse_cookie/index.html b/docs/en/cowlib/2.9/manual/cow_cookie.parse_cookie/index.html
index 089b5599..e47312f9 100644
--- a/docs/en/cowlib/2.9/manual/cow_cookie.parse_cookie/index.html
+++ b/docs/en/cowlib/2.9/manual/cow_cookie.parse_cookie/index.html
@@ -130,6 +130,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/index.html b/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/index.html
index ec50d655..bb074f88 100644
--- a/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/index.html
+++ b/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/index.html
@@ -137,6 +137,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/cow_cookie.setcookie/index.html b/docs/en/cowlib/2.9/manual/cow_cookie.setcookie/index.html
index 1e68718d..ebf16f1b 100644
--- a/docs/en/cowlib/2.9/manual/cow_cookie.setcookie/index.html
+++ b/docs/en/cowlib/2.9/manual/cow_cookie.setcookie/index.html
@@ -138,6 +138,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/cow_cookie/index.html b/docs/en/cowlib/2.9/manual/cow_cookie/index.html
index ccfb687b..467f99d7 100644
--- a/docs/en/cowlib/2.9/manual/cow_cookie/index.html
+++ b/docs/en/cowlib/2.9/manual/cow_cookie/index.html
@@ -169,6 +169,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/cowlib_app/index.html b/docs/en/cowlib/2.9/manual/cowlib_app/index.html
index 1c43ad84..6f1d6d1a 100644
--- a/docs/en/cowlib/2.9/manual/cowlib_app/index.html
+++ b/docs/en/cowlib/2.9/manual/cowlib_app/index.html
@@ -119,6 +119,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/cowlib/2.9/manual/index.html b/docs/en/cowlib/2.9/manual/index.html
index 33e04ecc..70c8c3d5 100644
--- a/docs/en/cowlib/2.9/manual/index.html
+++ b/docs/en/cowlib/2.9/manual/index.html
@@ -119,6 +119,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowlib/2.10/manual">2.10</a></li>
+
<li><a href="/docs/en/cowlib/2.9/manual">2.9</a></li>
<li><a href="/docs/en/cowlib/2.8/manual">2.8</a></li>
diff --git a/docs/en/gun/2.0/guide/index.html b/docs/en/gun/2.0/guide/index.html
index b6cb2ed6..cdfa5d76 100644
--- a/docs/en/gun/2.0/guide/index.html
+++ b/docs/en/gun/2.0/guide/index.html
@@ -76,6 +76,10 @@
<li><a href="websocket/">Using Websocket</a>
</li>
</ul>
+<h2 id="_advanced">Advanced</h2>
+<ul><li><a href="internals_tls_over_tls/">Internals: TLS over TLS</a>
+</li>
+</ul>
<h2 id="_additional_information">Additional information</h2>
<ul><li><a href="migrating_from_1.3/">Migrating from Gun 1.3 to 2.0</a>
</li>
diff --git a/docs/en/gun/2.0/guide/internals_tls_over_tls.asciidoc b/docs/en/gun/2.0/guide/internals_tls_over_tls.asciidoc
new file mode 100644
index 00000000..07e86698
--- /dev/null
+++ b/docs/en/gun/2.0/guide/internals_tls_over_tls.asciidoc
@@ -0,0 +1,177 @@
+== Internals: TLS over TLS
+
+The `ssl` application that comes with Erlang/OTP implements
+TLS using an interface equivalent to the `gen_tcp` interface:
+you get and manipulate a socket. The TLS encoding and
+decoding is applied transparently to the data sent and
+received.
+
+In order to have a TLS layer inside another TLS layer we
+need a way to encode the data of the inner layer before
+we pass it to the outer layer. We cannot do this with
+a socket interface. Thankfully, the `ssl` application comes
+with options that allow to transform an `sslsocket()` into
+an encoder/decoder.
+
+The implementation is however a little convoluted as a
+result. This chapter aims to give an overview of how it
+all works under the hood.
+
+=== gun_tls_proxy
+
+The module `gun_tls_proxy` implements an intermediary process
+that sits between the Gun process and the TLS process. It is
+responsible for routing data from the Gun process to the TLS
+process, and from the TLS process to the Gun process.
+
+In order to obtain the TLS encoded data the `cb_info` option
+is given to the `ssl:connect/3` function. This replaces the
+default TCP outer socket module with our own custom module.
+Gun uses the `gun_tls_proxy_cb` module instead. This module
+will forward all messages to the `gun_tls_proxy` process.
+
+The resulting operations looks like this:
+
+----
+Gun process <-> gun_tls_proxy <-> sslsocket() <-> gun_tls_proxy <-> "inner socket"
+----
+
+The "inner socket" is the socket for the Gun connection.
+The `gun_tls_proxy` process decides where to send or
+receive the data based on where it's coming from. This
+is how it knows whether the data has been encoded/decoded
+or not.
+
+Because the `ssl:connect/3` function call is blocking,
+a temporary process is used while connecting. This is required
+because the `gun_tls_proxy` needs to forward data even while
+performing the TLS handshake, otherwise the `ssl:connect/3`
+call will not complete.
+
+The result of the `ssl:connect/3` call is forward to the Gun
+process, along with the negotiated protocols when the connection
+was successful.
+
+The `gun_tls_proxy_cb` module does not actually implement
+`{active,N}` as requested by the `ssl` application. Instead
+it uses `{active,true}`.
+
+The behavior of the `gun_tls_proxy` process will vary depending
+on whether the TLS over TLS is done connection-wide or only
+stream-wide.
+
+=== Connection-wide TLS over TLS
+
+When used for the entire connection, the `gun_tls_proxy` process
+will act like a real socket once connected. The only difference
+is how the connection is performed. As mentioned earlier, the
+result of the `ssl:connect/3` call is sent back to the Gun process.
+
+When doing TLS over TLS the processes will end up looking like
+this:
+
+----
+Gun process <-> gun_tls_proxy <-> "inner socket"
+----
+
+The details of the interactions between `gun_tls_proxy` and
+its associated `sslsocket()` have been removed in order to
+better illustrate the concept.
+
+When adding another layer this becomes:
+
+----
+Gun process <-> gun_tls_proxy <-> gun_tls_proxy <-> sslsocket()
+----
+
+This is what is done when only HTTP/1.1 and SOCKS proxies are
+involved.
+
+=== Stream-wide TLS over TLS
+
+The same cannot be done for HTTP/2 proxies. This is because the
+HTTP/2 CONNECT method does not apply to the entire connection,
+but only to a stream. The proxied data must be wrapped inside
+a DATA frame. It cannot be sent directly. This is what must be
+done:
+
+----
+Gun process -> gun_tls_proxy -> Gun process -> "inner socket"
+----
+
+The "inner socket" is the socket for the HTTP/2 connection.
+
+In order to tell Gun to continue processing the data, the
+`handle_continue` mechanism is introduced. When `gun_tls_proxy`
+has TLS encoded the data it sends it back to the Gun process,
+wrapped in a `handle_continue` tuple. This tuple contains
+enough information to figure out what stream the data belongs
+to and what should be done next. Gun will therefore route the
+data to the correct layer and continue sending it.
+
+This solution is also used for receiving data, except in the
+reverse order.
+
+=== Routing to the right stream
+
+In order to know where to route the data, the `stream_ref`
+had to be modified to contain all the references to the
+individual streams. So if the tunnel is identified by
+`StreamA` and a request on this tunnel is identified
+by `StreamB`, then the stream is known as `[StreamA, StreamB]`
+to the user. Gun then routes first to `StreamA`, a
+tunnel, which continues routing to `StreamB`.
+
+A problem comes up if an intermediary is a SOCKS server,
+for example in the following scenario:
+
+----
+HTTP/2 proxy <-> SOCKS proxy <-> HTTP/1.1 origin
+----
+
+The SOCKS protocol doesn't have a concept of stream,
+therefore when we refer to request to the origin server
+they are `[StreamA, StreamB]`, not `[StreamA, StreamB, StreamC]`.
+This is a problem for routing encoded/decoded TLS data
+to the SOCKS layer: we don't have a built-in way of referring
+to the SOCKS layer.
+
+The solution is to have a separate `handle_continue_stream_ref`
+value that assigns a reference to the SOCKS layers. Gun will
+then be able to forward `handle_continue` message, and only
+them, to the appropriate layer.
+
+Gun therefore has two different routing avenues, but the
+mechanism remains the same otherwise.
+
+=== gun_tunnel
+
+In order to simplify the routing, the `gun_tunnel` module
+was introduced. For each intermediary (including the original
+CONNECT stream at the HTTP/2 layer) there is a `gun_tunnel`
+module.
+
+Going back to the example above:
+
+----
+HTTP/2 proxy <-> SOCKS proxy <-> HTTP/1.1 origin
+----
+
+In this case the modules involved to handle the request
+will be as follow:
+
+----
+gun_http2 <-> gun_tunnel <-> gun_tunnel <-> gun_http
+----
+
+The `gun_http2` module doesn't do any routing, it just
+passes everything to the `gun_tunnel` module. The `gun_tunnel`
+module will then do the routing, which involves removing
+`StreamA` from `[StreamA, StreamB]` where appropriate.
+
+The `gun_tunnel` module also receives the TLS encoded/decoded
+data and forwards it appropriately. When it comes to sending
+data, it will return a `send` command that allows the previous
+module to continue sending the data. The `gun_http2` module
+will ultimately wrap the data to be sent in a DATA frame and
+send it to the "inner socket".
diff --git a/docs/en/gun/2.0/guide/internals_tls_over_tls/index.html b/docs/en/gun/2.0/guide/internals_tls_over_tls/index.html
new file mode 100644
index 00000000..7ebc2221
--- /dev/null
+++ b/docs/en/gun/2.0/guide/internals_tls_over_tls/index.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Internals: TLS over TLS</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Internals: TLS over TLS</span></h1>
+
+<p>The <code>ssl</code> application that comes with Erlang/OTP implements TLS using an interface equivalent to the <code>gen_tcp</code> interface: you get and manipulate a socket. The TLS encoding and decoding is applied transparently to the data sent and received.</p>
+<p>In order to have a TLS layer inside another TLS layer we need a way to encode the data of the inner layer before we pass it to the outer layer. We cannot do this with a socket interface. Thankfully, the <code>ssl</code> application comes with options that allow to transform an <code>sslsocket()</code> into an encoder/decoder.</p>
+<p>The implementation is however a little convoluted as a result. This chapter aims to give an overview of how it all works under the hood.</p>
+<h2 id="_gun_tls_proxy">gun_tls_proxy</h2>
+<p>The module <code>gun_tls_proxy</code> implements an intermediary process that sits between the Gun process and the TLS process. It is responsible for routing data from the Gun process to the TLS process, and from the TLS process to the Gun process.</p>
+<p>In order to obtain the TLS encoded data the <code>cb_info</code> option is given to the <code>ssl:connect/3</code> function. This replaces the default TCP outer socket module with our own custom module. Gun uses the <code>gun_tls_proxy_cb</code> module instead. This module will forward all messages to the <code>gun_tls_proxy</code> process.</p>
+<p>The resulting operations looks like this:</p>
+<div class="listingblock"><div class="content"><pre>Gun process &lt;-&gt; gun_tls_proxy &lt;-&gt; sslsocket() &lt;-&gt; gun_tls_proxy &lt;-&gt; &quot;inner socket&quot;</pre></div></div>
+<p>The &quot;inner socket&quot; is the socket for the Gun connection. The <code>gun_tls_proxy</code> process decides where to send or receive the data based on where it&apos;s coming from. This is how it knows whether the data has been encoded/decoded or not.</p>
+<p>Because the <code>ssl:connect/3</code> function call is blocking, a temporary process is used while connecting. This is required because the <code>gun_tls_proxy</code> needs to forward data even while performing the TLS handshake, otherwise the <code>ssl:connect/3</code> call will not complete.</p>
+<p>The result of the <code>ssl:connect/3</code> call is forward to the Gun process, along with the negotiated protocols when the connection was successful.</p>
+<p>The <code>gun_tls_proxy_cb</code> module does not actually implement <code>{active,N}</code> as requested by the <code>ssl</code> application. Instead it uses <code>{active,true}</code>.</p>
+<p>The behavior of the <code>gun_tls_proxy</code> process will vary depending on whether the TLS over TLS is done connection-wide or only stream-wide.</p>
+<h2 id="_connection_wide_tls_over_tls">Connection-wide TLS over TLS</h2>
+<p>When used for the entire connection, the <code>gun_tls_proxy</code> process will act like a real socket once connected. The only difference is how the connection is performed. As mentioned earlier, the result of the <code>ssl:connect/3</code> call is sent back to the Gun process.</p>
+<p>When doing TLS over TLS the processes will end up looking like this:</p>
+<div class="listingblock"><div class="content"><pre>Gun process &lt;-&gt; gun_tls_proxy &lt;-&gt; &quot;inner socket&quot;</pre></div></div>
+<p>The details of the interactions between <code>gun_tls_proxy</code> and its associated <code>sslsocket()</code> have been removed in order to better illustrate the concept.</p>
+<p>When adding another layer this becomes:</p>
+<div class="listingblock"><div class="content"><pre>Gun process &lt;-&gt; gun_tls_proxy &lt;-&gt; gun_tls_proxy &lt;-&gt; sslsocket()</pre></div></div>
+<p>This is what is done when only HTTP/1.1 and SOCKS proxies are involved.</p>
+<h2 id="_stream_wide_tls_over_tls">Stream-wide TLS over TLS</h2>
+<p>The same cannot be done for HTTP/2 proxies. This is because the HTTP/2 CONNECT method does not apply to the entire connection, but only to a stream. The proxied data must be wrapped inside a DATA frame. It cannot be sent directly. This is what must be done:</p>
+<div class="listingblock"><div class="content"><pre>Gun process -&gt; gun_tls_proxy -&gt; Gun process -&gt; &quot;inner socket&quot;</pre></div></div>
+<p>The &quot;inner socket&quot; is the socket for the HTTP/2 connection.</p>
+<p>In order to tell Gun to continue processing the data, the <code>handle_continue</code> mechanism is introduced. When <code>gun_tls_proxy</code> has TLS encoded the data it sends it back to the Gun process, wrapped in a <code>handle_continue</code> tuple. This tuple contains enough information to figure out what stream the data belongs to and what should be done next. Gun will therefore route the data to the correct layer and continue sending it.</p>
+<p>This solution is also used for receiving data, except in the reverse order.</p>
+<h2 id="_routing_to_the_right_stream">Routing to the right stream</h2>
+<p>In order to know where to route the data, the <code>stream_ref</code> had to be modified to contain all the references to the individual streams. So if the tunnel is identified by <code>StreamA</code> and a request on this tunnel is identified by <code>StreamB</code>, then the stream is known as <code>[StreamA, StreamB]</code> to the user. Gun then routes first to <code>StreamA</code>, a tunnel, which continues routing to <code>StreamB</code>.</p>
+<p>A problem comes up if an intermediary is a SOCKS server, for example in the following scenario:</p>
+<div class="listingblock"><div class="content"><pre>HTTP/2 proxy &lt;-&gt; SOCKS proxy &lt;-&gt; HTTP/1.1 origin</pre></div></div>
+<p>The SOCKS protocol doesn&apos;t have a concept of stream, therefore when we refer to request to the origin server they are <code>[StreamA, StreamB]</code>, not <code>[StreamA, StreamB, StreamC]</code>. This is a problem for routing encoded/decoded TLS data to the SOCKS layer: we don&apos;t have a built-in way of referring to the SOCKS layer.</p>
+<p>The solution is to have a separate <code>handle_continue_stream_ref</code> value that assigns a reference to the SOCKS layers. Gun will then be able to forward <code>handle_continue</code> message, and only them, to the appropriate layer.</p>
+<p>Gun therefore has two different routing avenues, but the mechanism remains the same otherwise.</p>
+<h2 id="_gun_tunnel">gun_tunnel</h2>
+<p>In order to simplify the routing, the <code>gun_tunnel</code> module was introduced. For each intermediary (including the original CONNECT stream at the HTTP/2 layer) there is a <code>gun_tunnel</code> module.</p>
+<p>Going back to the example above:</p>
+<div class="listingblock"><div class="content"><pre>HTTP/2 proxy &lt;-&gt; SOCKS proxy &lt;-&gt; HTTP/1.1 origin</pre></div></div>
+<p>In this case the modules involved to handle the request will be as follow:</p>
+<div class="listingblock"><div class="content"><pre>gun_http2 &lt;-&gt; gun_tunnel &lt;-&gt; gun_tunnel &lt;-&gt; gun_http</pre></div></div>
+<p>The <code>gun_http2</code> module doesn&apos;t do any routing, it just passes everything to the <code>gun_tunnel</code> module. The <code>gun_tunnel</code> module will then do the routing, which involves removing <code>StreamA</code> from <code>[StreamA, StreamB]</code> where appropriate.</p>
+<p>The <code>gun_tunnel</code> module also receives the TLS encoded/decoded data and forwards it appropriately. When it comes to sending data, it will return a <code>send</code> command that allows the previous module to continue sending the data. The <code>gun_http2</code> module will ultimately wrap the data to be sent in a DATA frame and send it to the &quot;inner socket&quot;.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/gun/2.0/guide/websocket/">
+ Websocket
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/">
+ Migrating from Gun 1.3 to 2.0
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/2.0/guide">2.0</a></li>
+
+ <li><a href="/docs/en/gun/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/gun/1.2/guide">1.2</a></li>
+
+ <li><a href="/docs/en/gun/1.1/guide">1.1</a></li>
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/2.0/guide/introduction.asciidoc b/docs/en/gun/2.0/guide/introduction.asciidoc
index a54a8d1d..097cf396 100644
--- a/docs/en/gun/2.0/guide/introduction.asciidoc
+++ b/docs/en/gun/2.0/guide/introduction.asciidoc
@@ -21,7 +21,7 @@ Gun is developed for Erlang/OTP 22.0 and newer.
Gun uses the ISC License.
----
-Copyright (c) 2013-2019, Loïc Hoguin <[email protected]>
+Copyright (c) 2013-2020, Loïc Hoguin <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/docs/en/gun/2.0/guide/introduction/index.html b/docs/en/gun/2.0/guide/introduction/index.html
index 6f8f0006..8a12d196 100644
--- a/docs/en/gun/2.0/guide/introduction/index.html
+++ b/docs/en/gun/2.0/guide/introduction/index.html
@@ -71,7 +71,7 @@
<p>Gun is developed for Erlang/OTP 22.0 and newer.</p>
<h2 id="_license">License</h2>
<p>Gun uses the ISC License.</p>
-<div class="listingblock"><div class="content"><pre>Copyright (c) 2013-2019, Loïc Hoguin &lt;[email protected]&gt;
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2013-2020, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/docs/en/gun/2.0/guide/migrating_from_1.3.asciidoc b/docs/en/gun/2.0/guide/migrating_from_1.3.asciidoc
index a20a0582..0afd19eb 100644
--- a/docs/en/gun/2.0/guide/migrating_from_1.3.asciidoc
+++ b/docs/en/gun/2.0/guide/migrating_from_1.3.asciidoc
@@ -1,12 +1,16 @@
[appendix]
== Migrating from Gun 1.3 to 2.0
-Gun 2.0 adds many features including graceful shutdown,
-flow control for data messages, event handlers, support
-for tunneling TLS connections through TLS proxies, Socks
-proxy support, and much more. It has only a limited
-number of breaking changes compared to the previous
-version.
+Gun 2.0 includes state of the art tunnel support. With
+Gun 2.0 it is possible to make request or data go through
+any number of proxy endpoints using any combination of
+TCP or TLS transports and HTTP/1.1, HTTP/2 or SOCKS5
+protocols. All combinations of the scenario Proxy1 ->
+Proxy2 -> Origin are tested and known to work.
+
+Gun 2.0 adds many more features such as Websocket over
+HTTP/2, a built-in cookie store, graceful shutdown, flow
+control for data messages, event handlers and more.
Gun 2.0 greatly improves the HTTP/2 performance when it
comes to receiving large response bodies; and when receiving
@@ -63,21 +67,21 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
timeout options for each of the steps, and the transport
options had to be split into `tcp_opts` and `tls_opts`.
-* Gun can connect through any number of HTTP, HTTPS, Socks
- or secure Socks proxies, including when Socks proxies are
- located after the HTTP(S) proxies. The ultimate endpoint
+* Gun now supports connecting through SOCKS proxies,
+ including secure SOCKS proxies. Both unauthenticated
+ and username/password authentication are supported.
+
+* Gun can connect through any number of HTTP, HTTPS, SOCKS
+ or secure SOCKS proxies, including SOCKS proxies
+ located after HTTP(S) proxies. The ultimate endpoint
may be using any protocol, including plain TCP, TLS,
HTTP/1.1 or HTTP/2.
-* Gun now supports connecting through Socks5 proxies,
- including secure Socks proxies. Both unauthenticated
- and username/password authentication are supported.
-
* When specifying which protocols to use, options can
now be provided specific to those protocols. It is
now possible to have separate HTTP options for an
HTTP proxy and the origin HTTP server, for example.
- See the new `protocols()` type for details.
+ See the new `gun:protocols()` type for details.
* Gun can now be used to send and receive raw data,
as if it was just a normal socket. This can be
@@ -91,6 +95,8 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
* Header names may now be provided as binary, string or atom.
+* Gun now automatically lowercases provided header names.
+
* Many HTTP/2 options have been added, allowing great
control over how Gun and the remote endpoint are
using the HTTP/2 connection. They can be used to
@@ -98,11 +104,11 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
example.
* It is now possible to send many Websocket frames in
- a single `gun:ws_send/2` call.
+ a single `gun:ws_send/3` call.
-* Gun will now send Websocket ping frames automatically
+* Gun may now send Websocket ping frames automatically
at intervals determined by the `keepalive` option. It
- defaults to 5 seconds.
+ is disabled by default.
* A new `silence_pings` option can be set to `false` to
receive all ping and pong frames when using Websocket.
@@ -124,13 +130,13 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
connection without using Gun's supervisor. It defaults
to `true`.
-* Gun now automatically lowercases provided header names.
-
* Many improvements have been done to postpone or reject
requests and other operations while in the wrong state
(for example during state transitions when switching
protocols or connecting to proxies).
+* Update Cowlib to 2.10.0.
+
=== Features removed
* Gun used to reject operations by processes that were not
@@ -143,8 +149,8 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
removed. It was previously deprecated in favor of `protocols`.
* The `keepalive` timeout is now disabled by default
- for HTTP/1.1. To be perfectly clear, this is unrelated
- to the HTTP/1.1 keep-alive mechanism.
+ for HTTP/1.1 and HTTP/2. To be perfectly clear, this
+ is unrelated to the HTTP/1.1 keep-alive mechanism.
=== Functions added
@@ -161,20 +167,32 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
=== Functions modified
-* The function `gun:info/1` now returns the owner of the connection.
+* The function `gun:info/1` now returns the owner of the
+ connection as well as the cookie store.
* The functions `gun:await/2,3,4`, `gun:await_body/2,3,4` and
`gun:await_up/1,2,3` now distinguish the error types. They
can be a timeout, a connection error, a stream error or a
down error (when the Gun process exited while waiting).
-* The functions `gun:await/2,3,4` will now receive upgrade and
- Websocket messages and return them.
+* The functions `gun:await/2,3,4` will now receive upgrades,
+ tunnel up and Websocket messages and return them.
+
+* Requests may now include the `tunnel` option to send the
+ request on a specific tunnel.
* The functions `gun:request/4,5,6` have been replaced with
`gun:headers/4,5` and `gun:request/5,6`. This provides a
cleaner separation between requests that are followed by
- a body separately from those that don't.
+ a body and those that don't.
+
+* The function `gun:ws_send/2` has been replaced with the
+ function `gun:ws_send/3`. The stream reference for the
+ corresponding Websocket upgrade request must now be given.
+
+=== Messages added
+
+* The `gun_tunnel_up` message has been added.
=== Messages modified
@@ -189,6 +207,8 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
contribute to a response smuggling security vulnerability
when Gun is used inside a proxy.
+* Gun will now better detect connection closes in some cases.
+
* Gun will no longer send duplicate connection-wide `gun_error`
messages to the same process.
@@ -199,6 +219,9 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
CONNECT over TLS has been corrected. It was mistakenly not
enabling HTTP/2.
+* Protocol options provided for a tunnel destination were
+ sometimes ignored. This should no longer be the case.
+
* Gun will no longer send an empty HTTP/2 DATA frame when
there is no request body. It was not necessary.
@@ -218,7 +241,7 @@ Gun 2.0 requires Erlang/OTP 22.0 or greater.
* Gun will no longer attempt to send empty data chunks. When
using HTTP/1.1 chunked transfer-encoding this caused the
- request body to terminated, even when `nofin` was given.
+ request body to end, even when `nofin` was given.
* Gun now always retries connecting immediately when the
connection goes down.
diff --git a/docs/en/gun/2.0/guide/migrating_from_1.3/index.html b/docs/en/gun/2.0/guide/migrating_from_1.3/index.html
index 6d9a22a9..65ea2bf5 100644
--- a/docs/en/gun/2.0/guide/migrating_from_1.3/index.html
+++ b/docs/en/gun/2.0/guide/migrating_from_1.3/index.html
@@ -62,7 +62,8 @@
<h1 class="lined-header"><span>Migrating from Gun 1.3 to 2.0</span></h1>
-<p>Gun 2.0 adds many features including graceful shutdown, flow control for data messages, event handlers, support for tunneling TLS connections through TLS proxies, Socks proxy support, and much more. It has only a limited number of breaking changes compared to the previous version.</p>
+<p>Gun 2.0 includes state of the art tunnel support. With Gun 2.0 it is possible to make request or data go through any number of proxy endpoints using any combination of TCP or TLS transports and HTTP/1.1, HTTP/2 or SOCKS5 protocols. All combinations of the scenario Proxy1 -&gt; Proxy2 -&gt; Origin are tested and known to work.</p>
+<p>Gun 2.0 adds many more features such as Websocket over HTTP/2, a built-in cookie store, graceful shutdown, flow control for data messages, event handlers and more.</p>
<p>Gun 2.0 greatly improves the HTTP/2 performance when it comes to receiving large response bodies; and when receiving response bodies from many separate requests concurrently.</p>
<p>Gun now shares much of its HTTP/2 code with Cowboy, including the HTTP/2 state machine. Numerous issues were fixed as a result because the Cowboy implementation was much more advanced.</p>
<p>The Gun connection process is now implemented using <code>gen_statem</code>.</p>
@@ -78,11 +79,11 @@
</li>
<li>In order to get separate events when connecting, the domain lookup, connection and TLS handshakes are now performed separately by Gun. As a result, there exists three separate timeout options for each of the steps, and the transport options had to be split into <code>tcp_opts</code> and <code>tls_opts</code>.
</li>
-<li>Gun can connect through any number of HTTP, HTTPS, Socks or secure Socks proxies, including when Socks proxies are located after the HTTP(S) proxies. The ultimate endpoint may be using any protocol, including plain TCP, TLS, HTTP/1.1 or HTTP/2.
+<li>Gun now supports connecting through SOCKS proxies, including secure SOCKS proxies. Both unauthenticated and username/password authentication are supported.
</li>
-<li>Gun now supports connecting through Socks5 proxies, including secure Socks proxies. Both unauthenticated and username/password authentication are supported.
+<li>Gun can connect through any number of HTTP, HTTPS, SOCKS or secure SOCKS proxies, including SOCKS proxies located after HTTP(S) proxies. The ultimate endpoint may be using any protocol, including plain TCP, TLS, HTTP/1.1 or HTTP/2.
</li>
-<li>When specifying which protocols to use, options can now be provided specific to those protocols. It is now possible to have separate HTTP options for an HTTP proxy and the origin HTTP server, for example. See the new <code>protocols()</code> type for details.
+<li>When specifying which protocols to use, options can now be provided specific to those protocols. It is now possible to have separate HTTP options for an HTTP proxy and the origin HTTP server, for example. See the new <code>gun:protocols()</code> type for details.
</li>
<li>Gun can now be used to send and receive raw data, as if it was just a normal socket. This can be useful when needing to connect through a number of HTTP/Socks proxies, allowing the use of Gun&apos;s great proxying capabilities (including TLS over TLS) for any sort of protocols. This can also be useful when performing HTTP/1.1 Upgrade to custom protocols.
</li>
@@ -90,11 +91,13 @@
</li>
<li>Header names may now be provided as binary, string or atom.
</li>
+<li>Gun now automatically lowercases provided header names.
+</li>
<li>Many HTTP/2 options have been added, allowing great control over how Gun and the remote endpoint are using the HTTP/2 connection. They can be used to improve performance or lower the memory usage, for example.
</li>
-<li>It is now possible to send many Websocket frames in a single <code>gun:ws_send/2</code> call.
+<li>It is now possible to send many Websocket frames in a single <code>gun:ws_send/3</code> call.
</li>
-<li>Gun will now send Websocket ping frames automatically at intervals determined by the <code>keepalive</code> option. It defaults to 5 seconds.
+<li>Gun may now send Websocket ping frames automatically at intervals determined by the <code>keepalive</code> option. It is disabled by default.
</li>
<li>A new <code>silence_pings</code> option can be set to <code>false</code> to receive all ping and pong frames when using Websocket. They are typically not needed and therefore silent by default.
</li>
@@ -106,17 +109,17 @@
</li>
<li>A new option <code>supervise</code> can be used to start a Gun connection without using Gun&apos;s supervisor. It defaults to <code>true</code>.
</li>
-<li>Gun now automatically lowercases provided header names.
-</li>
<li>Many improvements have been done to postpone or reject requests and other operations while in the wrong state (for example during state transitions when switching protocols or connecting to proxies).
</li>
+<li>Update Cowlib to 2.10.0.
+</li>
</ul>
<h2 id="_features_removed">Features removed</h2>
<ul><li>Gun used to reject operations by processes that were not the owner of the connection. This behavior has been removed. In general the caller of a request or other operation will receive the relevant messages unless the <code>reply_to</code> option is used.
</li>
<li>The <code>connect_destination()</code> option <code>protocol</code> has been removed. It was previously deprecated in favor of <code>protocols</code>.
</li>
-<li>The <code>keepalive</code> timeout is now disabled by default for HTTP/1.1. To be perfectly clear, this is unrelated to the HTTP/1.1 keep-alive mechanism.
+<li>The <code>keepalive</code> timeout is now disabled by default for HTTP/1.1 and HTTP/2. To be perfectly clear, this is unrelated to the HTTP/1.1 keep-alive mechanism.
</li>
</ul>
<h2 id="_functions_added">Functions added</h2>
@@ -128,13 +131,21 @@
</li>
</ul>
<h2 id="_functions_modified">Functions modified</h2>
-<ul><li>The function <code>gun:info/1</code> now returns the owner of the connection.
+<ul><li>The function <code>gun:info/1</code> now returns the owner of the connection as well as the cookie store.
</li>
<li>The functions <code>gun:await/2,3,4</code>, <code>gun:await_body/2,3,4</code> and <code>gun:await_up/1,2,3</code> now distinguish the error types. They can be a timeout, a connection error, a stream error or a down error (when the Gun process exited while waiting).
</li>
-<li>The functions <code>gun:await/2,3,4</code> will now receive upgrade and Websocket messages and return them.
+<li>The functions <code>gun:await/2,3,4</code> will now receive upgrades, tunnel up and Websocket messages and return them.
+</li>
+<li>Requests may now include the <code>tunnel</code> option to send the request on a specific tunnel.
</li>
-<li>The functions <code>gun:request/4,5,6</code> have been replaced with <code>gun:headers/4,5</code> and <code>gun:request/5,6</code>. This provides a cleaner separation between requests that are followed by a body separately from those that don&apos;t.
+<li>The functions <code>gun:request/4,5,6</code> have been replaced with <code>gun:headers/4,5</code> and <code>gun:request/5,6</code>. This provides a cleaner separation between requests that are followed by a body and those that don&apos;t.
+</li>
+<li>The function <code>gun:ws_send/2</code> has been replaced with the function <code>gun:ws_send/3</code>. The stream reference for the corresponding Websocket upgrade request must now be given.
+</li>
+</ul>
+<h2 id="_messages_added">Messages added</h2>
+<ul><li>The <code>gun_tunnel_up</code> message has been added.
</li>
</ul>
<h2 id="_messages_modified">Messages modified</h2>
@@ -144,12 +155,16 @@
<h2 id="_bugs_fixed">Bugs fixed</h2>
<ul><li><strong>POTENTIAL SECURITY VULNERABILITY</strong>: Fix transfer-encoding precedence over content-length in responses. This bug may contribute to a response smuggling security vulnerability when Gun is used inside a proxy.
</li>
+<li>Gun will now better detect connection closes in some cases.
+</li>
<li>Gun will no longer send duplicate connection-wide <code>gun_error</code> messages to the same process.
</li>
<li>Gun no longer crashes when trying to upgrade to Websocket over a connection restricted to HTTP/1.0.
</li>
<li>The default value for the preferred protocols when using CONNECT over TLS has been corrected. It was mistakenly not enabling HTTP/2.
</li>
+<li>Protocol options provided for a tunnel destination were sometimes ignored. This should no longer be the case.
+</li>
<li>Gun will no longer send an empty HTTP/2 DATA frame when there is no request body. It was not necessary.
</li>
<li>Gun will no longer error out when the owner process exits. The error reason will now be a <code>shutdown</code> tuple instead.
@@ -160,7 +175,7 @@
</li>
<li>Hostnames can now be provided as atom as stated by the documentation.
</li>
-<li>Gun will no longer attempt to send empty data chunks. When using HTTP/1.1 chunked transfer-encoding this caused the request body to terminated, even when <code>nofin</code> was given.
+<li>Gun will no longer attempt to send empty data chunks. When using HTTP/1.1 chunked transfer-encoding this caused the request body to end, even when <code>nofin</code> was given.
</li>
<li>Gun now always retries connecting immediately when the connection goes down.
</li>
@@ -192,8 +207,8 @@
<nav style="margin:1em 0">
- <a style="float:left" href="https://ninenines.eu/docs/en/gun/2.0/guide/websocket/">
- Websocket
+ <a style="float:left" href="https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/">
+ Internals: TLS over TLS
</a>
diff --git a/docs/en/gun/2.0/guide/protocols.asciidoc b/docs/en/gun/2.0/guide/protocols.asciidoc
index d2529e38..cd6de2cf 100644
--- a/docs/en/gun/2.0/guide/protocols.asciidoc
+++ b/docs/en/gun/2.0/guide/protocols.asciidoc
@@ -65,10 +65,6 @@ cancellation mechanism which allows Gun to inform the
server to stop sending a response for this particular
request, saving resources.
-It is not currently possible to upgrade an HTTP/2 connection
-to Websocket. Support for this will be added in a future
-release.
-
=== Websocket
Websocket is a binary protocol built on top of HTTP that
@@ -76,12 +72,9 @@ allows asynchronous concurrent communication between the
client and the server. A Websocket server can push data to
the client at any time.
-Websocket is only available as a connection upgrade over
-an HTTP/1.1 connection.
-
-Once the Websocket connection is established, the only
-operation available on this connection is sending Websocket
-frames using `gun:ws_send/2`.
+Once the Websocket connection is established over an HTTP/1.1
+connection, the only operation available on this connection
+is sending Websocket frames using `gun:ws_send/3`.
Gun will send a `gun_ws` message for every frame received.
@@ -108,7 +101,7 @@ current protocol.
| await_body | yes | yes | no
| flush | yes | yes | no
| cancel | yes | yes | no
-| ws_upgrade | yes | no | no
+| ws_upgrade | yes | yes | no
| ws_send | no | no | yes
|===
@@ -122,6 +115,6 @@ current protocol.
| gun_data | yes | yes | no
| gun_trailers | yes | yes | no
| gun_error | yes | yes | yes
-| gun_upgrade | yes | no | no
+| gun_upgrade | yes | yes | no
| gun_ws | no | no | yes
|===
diff --git a/docs/en/gun/2.0/guide/protocols/index.html b/docs/en/gun/2.0/guide/protocols/index.html
index ef0c58fd..ccf854d0 100644
--- a/docs/en/gun/2.0/guide/protocols/index.html
+++ b/docs/en/gun/2.0/guide/protocols/index.html
@@ -76,11 +76,9 @@
<p>The HTTP/2 interface is very similar to HTTP/1.1, so this section instead focuses on the differences in the interface for the two protocols.</p>
<p>Gun will send <code>gun_push</code> messages for every push received. They will always be sent before the <code>gun_response</code> message. They can be ignored safely if they are not needed, or they can be canceled.</p>
<p>The <code>gun:cancel/2</code> function will use the HTTP/2 stream cancellation mechanism which allows Gun to inform the server to stop sending a response for this particular request, saving resources.</p>
-<p>It is not currently possible to upgrade an HTTP/2 connection to Websocket. Support for this will be added in a future release.</p>
<h2 id="_websocket">Websocket</h2>
<p>Websocket is a binary protocol built on top of HTTP that allows asynchronous concurrent communication between the client and the server. A Websocket server can push data to the client at any time.</p>
-<p>Websocket is only available as a connection upgrade over an HTTP/1.1 connection.</p>
-<p>Once the Websocket connection is established, the only operation available on this connection is sending Websocket frames using <code>gun:ws_send/2</code>.</p>
+<p>Once the Websocket connection is established over an HTTP/1.1 connection, the only operation available on this connection is sending Websocket frames using <code>gun:ws_send/3</code>.</p>
<p>Gun will send a <code>gun_ws</code> message for every frame received.</p>
<h2 id="_summary">Summary</h2>
<p>The two following tables summarize the supported operations and the messages Gun sends depending on the connection&apos;s current protocol.</p>
@@ -157,7 +155,7 @@
</tr>
<tr><td>ws_upgrade</td>
<td>yes</td>
-<td>no</td>
+<td>yes</td>
<td>no</td>
</tr>
<tr><td>ws_send</td>
@@ -204,7 +202,7 @@
</tr>
<tr><td>gun_upgrade</td>
<td>yes</td>
-<td>no</td>
+<td>yes</td>
<td>no</td>
</tr>
<tr><td>gun_ws</td>
diff --git a/docs/en/gun/2.0/guide/websocket.asciidoc b/docs/en/gun/2.0/guide/websocket.asciidoc
index 287b3f73..ba06e2c7 100644
--- a/docs/en/gun/2.0/guide/websocket.asciidoc
+++ b/docs/en/gun/2.0/guide/websocket.asciidoc
@@ -49,7 +49,7 @@ undocumented and must be set to `gun_ws_h`.
.Upgrade to Websocket with protocol negotiation
[source,erlang]
----
-gun:ws_upgrade(ConnPid, "/websocket", []
+StreamRef = gun:ws_upgrade(ConnPid, "/websocket", []
#{protocols => [{<<"xmpp">>, gun_ws_h}]}).
----
@@ -88,18 +88,18 @@ Once the Websocket upgrade has completed successfully, you no
longer have access to functions for performing requests. You
can only send and receive Websocket messages.
-Use `gun:ws_send/2` to send messages to the server.
+Use `gun:ws_send/3` to send messages to the server.
.Send a text frame
[source,erlang]
----
-gun:ws_send(ConnPid, {text, "Hello!"}).
+gun:ws_send(ConnPid, StreamRef, {text, "Hello!"}).
----
.Send a text frame, a binary frame and then close the connection
[source,erlang]
----
-gun:ws_send(ConnPid, [
+gun:ws_send(ConnPid, StreamRef, [
{text, "Hello!"},
{binary, BinaryValue},
close
diff --git a/docs/en/gun/2.0/guide/websocket/index.html b/docs/en/gun/2.0/guide/websocket/index.html
index 2d6b8c9c..b407ad4e 100644
--- a/docs/en/gun/2.0/guide/websocket/index.html
+++ b/docs/en/gun/2.0/guide/websocket/index.html
@@ -91,7 +91,7 @@ http://www.gnu.org/software/src-highlite -->
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">gun:ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/websocket"</font>, []
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/websocket"</font>, []
#{<font color="#0000FF">protocols</font> <font color="#990000">=&gt;</font> [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"xmpp"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">gun_ws_h</font>}]})<font color="#990000">.</font></tt></pre>
</div></div>
<p>The upgrade will fail if the server cannot satisfy the protocol negotiation.</p>
@@ -115,20 +115,20 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<h2 id="_sending_data">Sending data</h2>
<p>Once the Websocket upgrade has completed successfully, you no longer have access to functions for performing requests. You can only send and receive Websocket messages.</p>
-<p>Use <code>gun:ws_send/2</code> to send messages to the server.</p>
+<p>Use <code>gun:ws_send/3</code> to send messages to the server.</p>
<div class="listingblock"><div class="title">Send a text frame</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello!"</font>})<font color="#990000">.</font></tt></pre>
+<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello!"</font>})<font color="#990000">.</font></tt></pre>
</div></div>
<div class="listingblock"><div class="title">Send a text frame, a binary frame and then close the connection</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, [
+<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, [
{<font color="#FF6600">text</font>, <font color="#FF0000">"Hello!"</font>},
{<b><font color="#000080">binary</font></b>, <font color="#009900">BinaryValue</font>},
<font color="#FF6600">close</font>
@@ -165,8 +165,8 @@ http://www.gnu.org/software/src-highlite -->
- <a style="float:right" href="https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/">
- Migrating from Gun 1.3 to 2.0
+ <a style="float:right" href="https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/">
+ Internals: TLS over TLS
</a>
</nav>
diff --git a/docs/en/gun/2.0/manual/gun.await/index.html b/docs/en/gun/2.0/manual/gun.await/index.html
index 9f49dadb..dbe34b83 100644
--- a/docs/en/gun/2.0/manual/gun.await/index.html
+++ b/docs/en/gun/2.0/manual/gun.await/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#990000">-&gt;</font> <font color="#009900">Result</font>
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">MonitorRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
<font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>()
<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">tuple</font></b>() <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
diff --git a/docs/en/gun/2.0/manual/gun.await_body/index.html b/docs/en/gun/2.0/manual/gun.await_body/index.html
index fcb9d814..f9df33ec 100644
--- a/docs/en/gun/2.0/manual/gun.await_body/index.html
+++ b/docs/en/gun/2.0/manual/gun.await_body/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>} | {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Trailers</font>} | {<font color="#FF6600">error</font>, <font color="#009900">Reason</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">MonitorRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
<font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>()
<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
diff --git a/docs/en/gun/2.0/manual/gun.await_up/index.html b/docs/en/gun/2.0/manual/gun.await_up/index.html
index cd9d1e4b..c0927cef 100644
--- a/docs/en/gun/2.0/manual/gun.await_up/index.html
+++ b/docs/en/gun/2.0/manual/gun.await_up/index.html
@@ -118,7 +118,7 @@ http://www.gnu.org/software/src-highlite -->
{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await_up</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
</div></div>
<h2 id="_see_also">See also</h2>
-<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun_socks_up">gun_socks_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun_tunnel_up">gun_tunnel_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
diff --git a/docs/en/gun/2.0/manual/gun.cancel/index.html b/docs/en/gun/2.0/manual/gun.cancel/index.html
index f4587e06..8876cfd5 100644
--- a/docs/en/gun/2.0/manual/gun.cancel/index.html
+++ b/docs/en/gun/2.0/manual/gun.cancel/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">cancel</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Cancel the given stream.</p>
<p>The behavior of this function depends on the protocol selected.</p>
diff --git a/docs/en/gun/2.0/manual/gun.connect/index.html b/docs/en/gun/2.0/manual/gun.connect/index.html
index a695950d..b75c855d 100644
--- a/docs/en/gun/2.0/manual/gun.connect/index.html
+++ b/docs/en/gun/2.0/manual/gun.connect/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Destination</font> <font color="#990000">::</font> <b><font color="#000000">gun:connect_destination</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Establish a tunnel to the origin server.</p>
<p>This feature is currently only available for HTTP/1.1 connections. Upon successful completion of the CONNECT request a tunnel is established and subsequent requests will go through the tunnel.</p>
diff --git a/docs/en/gun/2.0/manual/gun.data/index.html b/docs/en/gun/2.0/manual/gun.data/index.html
index f37355fd..48e7a302 100644
--- a/docs/en/gun/2.0/manual/gun.data/index.html
+++ b/docs/en/gun/2.0/manual/gun.data/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font>
<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()</tt></pre>
</div></div>
diff --git a/docs/en/gun/2.0/manual/gun.delete/index.html b/docs/en/gun/2.0/manual/gun.delete/index.html
index a117d0d0..78854845 100644
--- a/docs/en/gun/2.0/manual/gun.delete/index.html
+++ b/docs/en/gun/2.0/manual/gun.delete/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Delete a resource.</p>
<h2 id="_arguments">Arguments</h2>
diff --git a/docs/en/gun/2.0/manual/gun.flush/index.html b/docs/en/gun/2.0/manual/gun.flush/index.html
index 96659ce3..52d1ac59 100644
--- a/docs/en/gun/2.0/manual/gun.flush/index.html
+++ b/docs/en/gun/2.0/manual/gun.flush/index.html
@@ -73,7 +73,7 @@ http://www.gnu.org/software/src-highlite -->
<b><font color="#000000">flush</font></b>(<font color="#009900">StreamRef</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Flush all messages related to a connection or a stream.</p>
<h2 id="_arguments">Arguments</h2>
diff --git a/docs/en/gun/2.0/manual/gun.get/index.html b/docs/en/gun/2.0/manual/gun.get/index.html
index 7119bd3c..b4d908d0 100644
--- a/docs/en/gun/2.0/manual/gun.get/index.html
+++ b/docs/en/gun/2.0/manual/gun.get/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Get a resource representation.</p>
<h2 id="_arguments">Arguments</h2>
diff --git a/docs/en/gun/2.0/manual/gun.head/index.html b/docs/en/gun/2.0/manual/gun.head/index.html
index e3ef3ad5..a4e8ba11 100644
--- a/docs/en/gun/2.0/manual/gun.head/index.html
+++ b/docs/en/gun/2.0/manual/gun.head/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Get headers of a resource representation.</p>
<p>This function performs the same operation as <a href="../gun.get">gun:get(3)</a>, except the server will not send the resource representation, only the response&apos;s status code and headers.</p>
diff --git a/docs/en/gun/2.0/manual/gun.headers/index.html b/docs/en/gun/2.0/manual/gun.headers/index.html
index 8f7c819b..c54b1f7d 100644
--- a/docs/en/gun/2.0/manual/gun.headers/index.html
+++ b/docs/en/gun/2.0/manual/gun.headers/index.html
@@ -80,7 +80,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Initiate the given request.</p>
<p>This is a general purpose function that should only be used when other method-specific functions do not apply.</p>
diff --git a/docs/en/gun/2.0/manual/gun.info/index.html b/docs/en/gun/2.0/manual/gun.info/index.html
index 6fbaaf8b..5d87f97a 100644
--- a/docs/en/gun/2.0/manual/gun.info/index.html
+++ b/docs/en/gun/2.0/manual/gun.info/index.html
@@ -79,6 +79,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">ws</font>,
<font color="#0000FF">sock_ip</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:ip_address</font></b>(),
<font color="#0000FF">sock_port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">origin_scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>,
<font color="#0000FF">origin_host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
<font color="#0000FF">origin_port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
<font color="#0000FF">intermediaries</font> <font color="#990000">=&gt;</font> [<font color="#009900">Intermediary</font>],
@@ -89,7 +90,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
<font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
<font color="#0000FF">transport</font> <font color="#990000">=&gt;</font> <font color="#FF6600">tcp</font> | <font color="#FF6600">tls</font>,
- <font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font>
+ <font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">raw</font>
}</tt></pre>
</div></div>
<p>Obtain information about the connection.</p>
@@ -101,7 +102,7 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_return_value">Return value</h2>
<p>A map is returned containing various informations about the connection.</p>
<h2 id="_changelog">Changelog</h2>
-<ul><li><strong>2.0</strong>: The values <code>owner</code> and <code>cookie_store</code> were added.
+<ul><li><strong>2.0</strong>: The values <code>owner</code>, <code>origin_scheme</code> and <code>cookie_store</code> were added.
</li>
<li><strong>1.3</strong>: The values <code>socket</code>, <code>transport</code>, <code>protocol</code>, <code>origin_host</code>, <code>origin_port</code> and <code>intermediaries</code> were added.
</li>
diff --git a/docs/en/gun/2.0/manual/gun.open/index.html b/docs/en/gun/2.0/manual/gun.open/index.html
index 97b90d3b..7253b733 100644
--- a/docs/en/gun/2.0/manual/gun.open/index.html
+++ b/docs/en/gun/2.0/manual/gun.open/index.html
@@ -122,7 +122,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>({<font color="#993399">127</font>,<font color="#993399">0</font>,<font color="#993399">0</font>,<font color="#993399">1</font>}, <font color="#993399">443</font>)<font color="#990000">.</font></tt></pre>
</div></div>
<h2 id="_see_also">See also</h2>
-<p><a href="../gun">gun(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_socks_up">gun_socks_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_tunnel_up">gun_tunnel_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
diff --git a/docs/en/gun/2.0/manual/gun.open_unix/index.html b/docs/en/gun/2.0/manual/gun.open_unix/index.html
index 725ac5de..c681d915 100644
--- a/docs/en/gun/2.0/manual/gun.open_unix/index.html
+++ b/docs/en/gun/2.0/manual/gun.open_unix/index.html
@@ -110,7 +110,7 @@ http://www.gnu.org/software/src-highlite -->
#{<font color="#0000FF">protocols</font> <font color="#990000">=&gt;</font> [<font color="#FF6600">http2</font>]})<font color="#990000">.</font></tt></pre>
</div></div>
<h2 id="_see_also">See also</h2>
-<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_socks_up">gun_socks_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_tunnel_up">gun_tunnel_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
diff --git a/docs/en/gun/2.0/manual/gun.options/index.html b/docs/en/gun/2.0/manual/gun.options/index.html
index 2376b6da..64ff4350 100644
--- a/docs/en/gun/2.0/manual/gun.options/index.html
+++ b/docs/en/gun/2.0/manual/gun.options/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Query the capabilities of the server or a resource.</p>
<p>The special path <code>&quot;*&quot;</code> can be used to obtain information about the server as a whole. Any other path will return information about that resource specifically.</p>
diff --git a/docs/en/gun/2.0/manual/gun.patch/index.html b/docs/en/gun/2.0/manual/gun.patch/index.html
index b35be5fa..bbb181e9 100644
--- a/docs/en/gun/2.0/manual/gun.patch/index.html
+++ b/docs/en/gun/2.0/manual/gun.patch/index.html
@@ -86,7 +86,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Apply a set of changes to a resource.</p>
<p>The behavior of this function varies depending on whether a body is provided.</p>
diff --git a/docs/en/gun/2.0/manual/gun.post/index.html b/docs/en/gun/2.0/manual/gun.post/index.html
index 47c32880..382c9f1f 100644
--- a/docs/en/gun/2.0/manual/gun.post/index.html
+++ b/docs/en/gun/2.0/manual/gun.post/index.html
@@ -86,7 +86,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Process the enclosed representation according to a resource&apos;s own semantics.</p>
<p>The behavior of this function varies depending on whether a body is provided.</p>
diff --git a/docs/en/gun/2.0/manual/gun.put/index.html b/docs/en/gun/2.0/manual/gun.put/index.html
index 2ec1ba7d..d6e160fc 100644
--- a/docs/en/gun/2.0/manual/gun.put/index.html
+++ b/docs/en/gun/2.0/manual/gun.put/index.html
@@ -86,7 +86,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Create or replace a resource.</p>
<p>The behavior of this function varies depending on whether a body is provided.</p>
diff --git a/docs/en/gun/2.0/manual/gun.request/index.html b/docs/en/gun/2.0/manual/gun.request/index.html
index f4090fec..9b8de5ce 100644
--- a/docs/en/gun/2.0/manual/gun.request/index.html
+++ b/docs/en/gun/2.0/manual/gun.request/index.html
@@ -81,7 +81,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Perform the given request.</p>
<p>This is a general purpose function that should only be used when other method-specific functions do not apply.</p>
diff --git a/docs/en/gun/2.0/manual/gun.stream_info/index.html b/docs/en/gun/2.0/manual/gun.stream_info/index.html
index 950ef659..7e2a43d7 100644
--- a/docs/en/gun/2.0/manual/gun.stream_info/index.html
+++ b/docs/en/gun/2.0/manual/gun.stream_info/index.html
@@ -72,11 +72,27 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">stream_info</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#000080">undefined</font> | <font color="#009900">Info</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_connected</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Info</font> <font color="#990000">::</font> #{
- <font color="#0000FF">ref</font> <font color="#990000">=&gt;</font> <b><font color="#000080">reference</font></b>(),
- <font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <b><font color="#000080">pid</font></b>(),
- <font color="#0000FF">state</font> <font color="#990000">=&gt;</font> <b><font color="#000080">running</font></b> | <font color="#FF6600">stopping</font>
+ <font color="#0000FF">ref</font> <font color="#990000">=&gt;</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#0000FF">state</font> <font color="#990000">=&gt;</font> <b><font color="#000080">running</font></b> | <font color="#FF6600">stopping</font>,
+ <font color="#0000FF">intermediaries</font> <font color="#990000">=&gt;</font> [<font color="#009900">Intermediary</font>],
+ <font color="#0000FF">tunnel</font> <font color="#990000">=&gt;</font> <font color="#009900">Tunnel</font>
+}
+<font color="#009900">Intermediary</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">connect</font> | <font color="#FF6600">socks5</font>,
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">transport</font> <font color="#990000">=&gt;</font> <font color="#FF6600">tcp</font> | <font color="#FF6600">tls</font>,
+ <font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">raw</font>
+}
+<font color="#009900">Tunnel</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">transport</font> <font color="#990000">=&gt;</font> <font color="#FF6600">tcp</font> | <font color="#FF6600">tls</font>,
+ <font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">raw</font>,
+ <font color="#0000FF">origin_scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">origin_host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#0000FF">origin_port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>()
}</tt></pre>
</div></div>
<p>Obtain information about a stream.</p>
diff --git a/docs/en/gun/2.0/manual/gun.update_flow/index.html b/docs/en/gun/2.0/manual/gun.update_flow/index.html
index 9c2a4126..55fc1806 100644
--- a/docs/en/gun/2.0/manual/gun.update_flow/index.html
+++ b/docs/en/gun/2.0/manual/gun.update_flow/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">update_flow</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Flow</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Flow</font> <font color="#990000">::</font> <b><font color="#000000">pos_integer</font></b>()</tt></pre>
</div></div>
<p>Update a stream&apos;s flow control value.</p>
diff --git a/docs/en/gun/2.0/manual/gun.ws_send/index.html b/docs/en/gun/2.0/manual/gun.ws_send/index.html
index f7318b1d..9761cf74 100644
--- a/docs/en/gun/2.0/manual/gun.ws_send/index.html
+++ b/docs/en/gun/2.0/manual/gun.ws_send/index.html
@@ -69,13 +69,14 @@
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Frames</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
-
-<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">Frames</font> <font color="#990000">::</font> <font color="#009900">Frame</font> | [<font color="#009900">Frame</font>]
-<font color="#009900">Frame</font> <font color="#990000">::</font> <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>
- | {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
- | {<font color="#FF6600">close</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+<pre><tt><b><font color="#000000">ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Frames</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
+<font color="#009900">Frames</font> <font color="#990000">::</font> <font color="#009900">Frame</font> | [<font color="#009900">Frame</font>]
+<font color="#009900">Frame</font> <font color="#990000">::</font> <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>
+ | {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<font color="#FF6600">close</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
</div></div>
<p>Send Websocket frames.</p>
<p>The connection must first be upgraded to Websocket using the function <a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>.</p>
@@ -83,6 +84,9 @@ http://www.gnu.org/software/src-highlite -->
<dl><dt>ConnPid</dt>
<dd><p>The pid of the Gun connection process.</p>
</dd>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream that was upgraded to Websocket.</p>
+</dd>
<dt>Frames</dt>
<dd><p>One or more Websocket frame(s).</p>
</dd>
@@ -90,7 +94,11 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_return_value">Return value</h2>
<p>The atom <code>ok</code> is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<ul><li><strong>1.0</strong>: Function introduced.
+<ul><li><strong>2.0</strong>: The mandatory <code>StreamRef</code> argument was added.
+</li>
+<li><strong>2.0</strong>: It is now possible to send multiple frames at once.
+</li>
+<li><strong>1.0</strong>: Function introduced.
</li>
</ul>
<h2 id="_examples">Examples</h2>
@@ -99,14 +107,14 @@ http://www.gnu.org/software/src-highlite -->
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
</div></div>
<div class="listingblock"><div class="title">Send many frames including a close frame</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, [
+<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, [
{<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"See you later, world!"</font><font color="#990000">&gt;&gt;</font>},
<font color="#FF6600">close</font>
])<font color="#990000">.</font></tt></pre>
diff --git a/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html b/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html
index d3fc50d6..40fb7115 100644
--- a/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html
+++ b/docs/en/gun/2.0/manual/gun.ws_upgrade/index.html
@@ -82,7 +82,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_headers</font></b>()
<font color="#009900">WsOpts</font> <font color="#990000">::</font> <font color="#FF6600">gun</font><font color="#990000">:</font><font color="#FF6600">ws_opts</font>
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()</tt></pre>
</div></div>
<p>Upgrade to Websocket.</p>
<p>The behavior of this function depends on the protocol selected.</p>
diff --git a/docs/en/gun/2.0/manual/gun/index.html b/docs/en/gun/2.0/manual/gun/index.html
index 2ee49896..7cf1858f 100644
--- a/docs/en/gun/2.0/manual/gun/index.html
+++ b/docs/en/gun/2.0/manual/gun/index.html
@@ -136,7 +136,7 @@
<p>Connection:</p>
<ul><li><a href="../gun_up">gun_up(3)</a> - The connection is up
</li>
-<li><a href="../gun_socks_up">gun_socks_up(3)</a> - The Socks connection is up
+<li><a href="../gun_tunnel_up">gun_tunnel_up(3)</a> - The tunnel is up
</li>
<li><a href="../gun_down">gun_down(3)</a> - The connection is down
</li>
@@ -210,11 +210,12 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">http_opts</font></b>() <font color="#990000">::</font> #{
- <font color="#0000FF">closing_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
- <font color="#0000FF">flow</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
- <font color="#0000FF">keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
- <font color="#0000FF">transform_header_name</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000080">binary</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>()),
- <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font>
+ <font color="#0000FF">closing_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">cookie_ignore_informational</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">flow</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
+ <font color="#0000FF">keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">transform_header_name</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000080">binary</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>()),
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font>
}</tt></pre>
</div></div>
<p>Configuration for the HTTP protocol.</p>
@@ -223,6 +224,9 @@ http://www.gnu.org/software/src-highlite -->
<dl><dt>closing_timeout (15000)</dt>
<dd><p>Time to wait before brutally closing the connection when a graceful shutdown was requested via a call to <a href="../gun.shutdown">gun:shutdown(3)</a>.</p>
</dd>
+<dt>cookie_ignore_informational (false)</dt>
+<dd><p>Whether cookies received inside informational responses (1xx status code) must be ignored.</p>
+</dd>
<dt>flow - see below</dt>
<dd><p>The initial flow control value for all HTTP/1.1 streams. By default flow control is disabled.</p>
</dd>
@@ -242,9 +246,10 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">http2_opts</font></b>() <font color="#990000">::</font> #{
- <font color="#0000FF">closing_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
- <font color="#0000FF">flow</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
- <font color="#0000FF">keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">closing_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">cookie_ignore_informational</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">flow</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
+ <font color="#0000FF">keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
<i><font color="#9A1900">%% HTTP/2 state machine configuration.</font></i>
<font color="#0000FF">connection_window_margin_size</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">16#7fffffff</font>,
@@ -272,10 +277,13 @@ http://www.gnu.org/software/src-highlite -->
<dl><dt>closing_timeout (15000)</dt>
<dd><p>Time to wait before brutally closing the connection when a graceful shutdown was requested either via a call to <a href="../gun.shutdown">gun:shutdown(3)</a> or by the server.</p>
</dd>
+<dt>cookie_ignore_informational (false)</dt>
+<dd><p>Whether cookies received inside informational responses (1xx status code) must be ignored.</p>
+</dd>
<dt>flow - see below</dt>
<dd><p>The initial flow control value for all HTTP/2 streams. By default flow control is disabled.</p>
</dd>
-<dt>keepalive (5000)</dt>
+<dt>keepalive (infinity)</dt>
<dd><p>Time between pings in milliseconds.</p>
</dd>
</dl>
@@ -374,12 +382,25 @@ http://www.gnu.org/software/src-highlite -->
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">protocols</font></b>() <font color="#990000">::</font> <font color="#FF6600">http</font> | {<font color="#FF6600">http</font>, <b><font color="#000000">http_opts</font></b>()}
- | <font color="#FF6600">http2</font> | {<font color="#FF6600">http2</font>, <b><font color="#000000">http2_opts</font></b>()}
- | <font color="#FF6600">socks</font> | {<font color="#FF6600">socks</font>, <b><font color="#000000">socks_opts</font></b>()}</tt></pre>
+<pre><tt><font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | {<font color="#FF6600">http</font>, <b><font color="#000000">http_opts</font></b>()}
+ | <font color="#FF6600">http2</font> | {<font color="#FF6600">http2</font>, <b><font color="#000000">http2_opts</font></b>()}
+ | <font color="#FF6600">raw</font> | {<font color="#FF6600">raw</font>, <b><font color="#000000">raw_opts</font></b>()}
+ | <font color="#FF6600">socks</font> | {<font color="#FF6600">socks</font>, <b><font color="#000000">socks_opts</font></b>()}
+
+<b><font color="#000000">protocols</font></b>() <font color="#990000">::</font> [<font color="#009900">Protocol</font>]</tt></pre>
</div></div>
<p>Ordered list of preferred protocols. When the transport is <code>tcp</code>, this list must contain exactly one protocol. When the transport is <code>tls</code>, this list must contain at least one protocol and will be used to negotiate a protocol via ALPN. When the server does not support ALPN then <code>http</code> will be used, except when the list of preferred protocols is set to only accept <code>socks</code>.</p>
<p>Defaults to <code>[http]</code> when the transport is <code>tcp</code>, and <code>[http2, http]</code> when the transport is <code>tls</code>.</p>
+<h3 id="_raw_opts">raw_opts()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">raw_opts</font></b>() <font color="#990000">::</font> #{
+}</tt></pre>
+</div></div>
+<p>Configuration for the &quot;raw&quot; protocol.</p>
+<!-- The default value is given next to the option name:-->
<h3 id="_req_headers">req_headers()</h3>
<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
@@ -452,6 +473,15 @@ http://www.gnu.org/software/src-highlite -->
<dd><p>Version of the Socks protocol to use.</p>
</dd>
</dl>
+<h3 id="_stream_ref">stream_ref()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">stream_ref</font></b>() <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>Unique identifier for a stream.</p>
+<p>The exact type is considered to be an implementation detail.</p>
<h3 id="_ws_opts">ws_opts()</h3>
<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
@@ -477,7 +507,7 @@ http://www.gnu.org/software/src-highlite -->
<dt>flow - see below</dt>
<dd><p>The initial flow control value for the Websocket connection. By default flow control is disabled.</p>
</dd>
-<dt>keepalive (5000)</dt>
+<dt>keepalive (infinity)</dt>
<dd><p>Time between pings in milliseconds.</p>
</dd>
<dt>protocols ([])</dt>
@@ -489,7 +519,9 @@ http://www.gnu.org/software/src-highlite -->
</dl>
<!-- @todo Document default_protocol and user_opts.-->
<h2 id="_changelog">Changelog</h2>
-<ul><li><strong>2.0</strong>: The option <code>cookie_store</code> was added. It can be used to configure a cookie store that Gun will use automatically.
+<ul><li><strong>2.0</strong>: The <code>stream_ref()</code> type was added.
+</li>
+<li><strong>2.0</strong>: The option <code>cookie_store</code> was added. It can be used to configure a cookie store that Gun will use automatically. A related option, <code>cookie_ignore_informational</code>, was added to both <code>http_opts()</code> and <code>http2_opts()</code>.
</li>
<li><strong>2.0</strong>: The types <code>protocols()</code> and <code>socks_opts()</code> have been added. Support for the Socks protocol has been added in every places where protocol selection is available. In addition it is now possible to specify separate HTTP options for the CONNECT proxy and the origin server.
</li>
@@ -505,10 +537,12 @@ http://www.gnu.org/software/src-highlite -->
</li>
<li><strong>2.0</strong>: Function <code>gun:headers/4,5</code> introduced.
</li>
-<li><strong>2.0</strong>: The <code>keepalive</code> option is now set to <code>infinity</code> by default for the HTTP/1.1 protocol, disabling it.
+<li><strong>2.0</strong>: The <code>keepalive</code> option is now set to <code>infinity</code> by default for all protocols. This means it is disabled.
</li>
<li><strong>2.0</strong>: Websocket options <code>keepalive</code> and <code>silence_pings</code> introduced.
</li>
+<li><strong>2.0</strong>: Remove the <code>protocol</code> option from <code>connect_destination()</code>.
+</li>
<li><strong>1.3</strong>: Add the CONNECT destination&apos;s <code>protocols</code> option and deprecate the previously introduced <code>protocol</code> option.
</li>
<li><strong>1.2</strong>: Introduce the type <code>connect_destination()</code>.
diff --git a/docs/en/gun/2.0/manual/gun_app/index.html b/docs/en/gun/2.0/manual/gun_app/index.html
index 128f9228..70f44278 100644
--- a/docs/en/gun/2.0/manual/gun_app/index.html
+++ b/docs/en/gun/2.0/manual/gun_app/index.html
@@ -74,6 +74,8 @@
</li>
<li><a href="../gun_cookies_list">gun_cookies_list(3)</a> - Cookie store backend: in-memory, per connection
</li>
+<li><a href="../gun_event">gun_event(3)</a> - Events
+</li>
</ul>
<h2 id="_dependencies">Dependencies</h2>
<ul><li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
diff --git a/docs/en/gun/2.0/manual/gun_data/index.html b/docs/en/gun/2.0/manual/gun_data/index.html
index a6b86b6b..080f442c 100644
--- a/docs/en/gun/2.0/manual/gun_data/index.html
+++ b/docs/en/gun/2.0/manual/gun_data/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_data</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font>
<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
</div></div>
diff --git a/docs/en/gun/2.0/manual/gun_down/index.html b/docs/en/gun/2.0/manual/gun_down/index.html
index 19aaddac..45a715df 100644
--- a/docs/en/gun/2.0/manual/gun_down/index.html
+++ b/docs/en/gun/2.0/manual/gun_down/index.html
@@ -74,7 +74,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
<font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">ws</font>
<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
-<font color="#009900">KilledStreams</font> <font color="#990000">::</font> [<b><font color="#000080">reference</font></b>()]</tt></pre>
+<font color="#009900">KilledStreams</font> <font color="#990000">::</font> [<b><font color="#000000">gun:stream_ref</font></b>()]</tt></pre>
</div></div>
<p>The connection is down.</p>
<p>This message informs the owner process that the connection was lost. Depending on the <code>retry</code> and <code>retry_timeout</code> options Gun may automatically attempt to reconnect.</p>
@@ -113,7 +113,7 @@ http://www.gnu.org/software/src-highlite -->
{<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
<h2 id="_see_also">See also</h2>
-<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun_up">gun_up(3)</a>, <a href="../gun_socks_up">gun_socks_up(3)</a>, <a href="../gun_error">gun_error(3)</a></p>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun_up">gun_up(3)</a>, <a href="../gun_tunnel_up">gun_tunnel_up(3)</a>, <a href="../gun_error">gun_error(3)</a></p>
diff --git a/docs/en/gun/2.0/manual/gun_error/index.html b/docs/en/gun/2.0/manual/gun_error/index.html
index f58af877..e0056f64 100644
--- a/docs/en/gun/2.0/manual/gun_error/index.html
+++ b/docs/en/gun/2.0/manual/gun_error/index.html
@@ -73,7 +73,7 @@ http://www.gnu.org/software/src-highlite -->
{<font color="#FF6600">gun_error</font>, <font color="#009900">ConnPid</font>, <font color="#009900">Reason</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
</div></div>
<p>Stream or connection-wide error.</p>
@@ -110,7 +110,7 @@ http://www.gnu.org/software/src-highlite -->
{<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
<h2 id="_see_also">See also</h2>
-<p><a href="../gun">gun(3)</a>, <a href="../gun_up">gun_up(3)</a>, <a href="../gun_socks_up">gun_socks_up(3)</a>, <a href="../gun_down">gun_down(3)</a></p>
+<p><a href="../gun">gun(3)</a>, <a href="../gun_up">gun_up(3)</a>, <a href="../gun_tunnel_up">gun_tunnel_up(3)</a>, <a href="../gun_down">gun_down(3)</a></p>
diff --git a/docs/en/gun/2.0/manual/gun_event/index.html b/docs/en/gun/2.0/manual/gun_event/index.html
new file mode 100644
index 00000000..1f6373c3
--- /dev/null
+++ b/docs/en/gun/2.0/manual/gun_event/index.html
@@ -0,0 +1,573 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: gun_event(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>gun_event(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>gun_event - Events</p>
+<h2 id="_description">Description</h2>
+<p>The <code>gun_event</code> module provides the callback interface and types for implementing event handlers.</p>
+<h2 id="_callbacks">Callbacks</h2>
+<p>Event handlers implement the following interface. Because types are tied to specific events, they are documented alongside them. All event types are exported and can be referred to as <code>gun_event:Type()</code>.</p>
+<p>The events are ordered by the order they are likely to be triggered, with the most frequent events listed first.</p>
+<h3 id="_init">init</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">init_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">owner</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">transport</font> <font color="#990000">:=</font> <font color="#FF6600">tcp</font> | <font color="#FF6600">tls</font>,
+ <font color="#FF6600">origin_scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#FF6600">origin_host</font> <font color="#990000">:=</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#FF6600">origin_port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">opts</font> <font color="#990000">:=</font> <b><font color="#000000">gun:opts</font></b>()
+}
+
+<b><font color="#000000">init</font></b>(<b><font color="#000000">init_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun is initializing.</p>
+<h3 id="_domain_lookup_start">domain_lookup_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">domain_lookup_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">tcp_opts</font> <font color="#990000">:=</font> [<b><font color="#000000">gen_tcp:connect_option</font></b>()],
+ <font color="#FF6600">timeout</font> <font color="#990000">:=</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">lookup_info</font> <font color="#990000">=&gt;</font> <b><font color="#000000">gun_tcp:lookup_info</font></b>(),
+ <font color="#0000FF">error</font> <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()
+}
+
+<b><font color="#000000">domain_lookup_start</font></b>(<b><font color="#000000">domain_lookup_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun is starting to resolve the host address.</p>
+<p>The <code>lookup_info</code> and <code>error</code> keys are never set for this event.</p>
+<h3 id="_domain_lookup_end">domain_lookup_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">domain_lookup_end</font></b>(<b><font color="#000000">domain_lookup_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished resolving the host address.</p>
+<p>The <code>lookup_info</code> key is only set when the lookup is successful. The <code>error</code> key is set otherwise.</p>
+<h3 id="_connect_start">connect_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">connect_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">lookup_info</font> <font color="#990000">:=</font> <b><font color="#000000">gun_tcp:lookup_info</font></b>(),
+ <font color="#FF6600">timeout</font> <font color="#990000">:=</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">socket</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:socket</font></b>(),
+ <font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">raw</font>,
+ <font color="#0000FF">error</font> <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()
+}
+
+<b><font color="#000000">connect_start</font></b>(<b><font color="#000000">connect_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun is starting to connect to the host address and port.</p>
+<p>The <code>socket</code>, <code>protocol</code> and <code>error</code> keys are never set for this event.</p>
+<h3 id="_connect_end">connect_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">connect_end</font></b>(<b><font color="#000000">connect_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished connecting to the host address and port.</p>
+<p>The <code>socket</code> key is set on connect success. The <code>error</code> key is set otherwise.</p>
+<p>The <code>protocol</code> key is only set when the transport is <code>tcp</code> and the connection is successful. The protocol is only known in the <code>tls_handshake_end</code> event otherwise.</p>
+<h3 id="_tls_handshake_start">tls_handshake_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">tls_handshake_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">stream_ref</font> <font color="#990000">=&gt;</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">socket</font> <font color="#990000">:=</font> <b><font color="#000000">inet:socket</font></b>() | <b><font color="#000000">ssl:sslsocket</font></b>() | <b><font color="#000080">pid</font></b>(), <i><font color="#9A1900">%% The socket before/after will be different.</font></i>
+ <font color="#FF6600">tls_opts</font> <font color="#990000">:=</font> [<b><font color="#000000">ssl:tls_client_option</font></b>()],
+ <font color="#FF6600">timeout</font> <font color="#990000">:=</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">raw</font>,
+ <font color="#0000FF">error</font> <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()
+}
+
+<b><font color="#000000">tls_handshake_start</font></b>(<b><font color="#000000">tls_handshake_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has started a TLS handshake.</p>
+<p>This and the <code>tls_handshake_end</code> event only occur when connecting to a TLS server or when upgrading the connection or a stream to use TLS, for example when using CONNECT or when connecting to a secure SOCKS server.</p>
+<p>The <code>stream_ref</code> and <code>reply_to</code> keys are only set when the TLS handshake occurs as a result of a CONNECT request or inside an existing CONNECT tunnel.</p>
+<p>The <code>protocol</code> and <code>error</code> keys are never set for this event.</p>
+<h3 id="_tls_handshake_end">tls_handshake_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">tls_handshake_end</font></b>(<b><font color="#000000">tls_handshake_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished a TLS handshake.</p>
+<p>The <code>protocol</code> key is set on TLS handshake success. The <code>error</code> key is set otherwise.</p>
+<h3 id="_request_start">request_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">request_start_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">function</font> <font color="#990000">:=</font> <font color="#FF6600">headers</font> | <font color="#FF6600">request</font> | <font color="#FF6600">ws_upgrade</font> | <font color="#FF6600">connect</font>,
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000000">iodata</font></b>(),
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#FF6600">authority</font> <font color="#990000">:=</font> <b><font color="#000000">iodata</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>(),
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+}
+
+<b><font color="#000000">request_start</font></b>(<b><font color="#000000">request_start_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun is starting to send a request.</p>
+<p>The <code>scheme</code> and <code>path</code> keys are never set when the <code>function</code> is set to <code>connect</code>.</p>
+<h3 id="_request_headers">request_headers</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">request_headers</font></b>(<b><font color="#000000">request_start_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished sending the request headers.</p>
+<h3 id="_request_end">request_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">request_end_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>()
+}
+
+<b><font color="#000000">request_end</font></b>(<b><font color="#000000">request_end_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished sending the request.</p>
+<h3 id="_push_promise_start">push_promise_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">push_promise_start_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>()
+}
+
+<b><font color="#000000">push_promise_start</font></b>(<b><font color="#000000">push_promise_start_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has begun receiving a promised request (server push).</p>
+<h3 id="_push_promise_end">push_promise_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">push_promise_end_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#0000FF">promised_stream_ref</font> <font color="#990000">=&gt;</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#FF6600">uri</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+}
+
+<b><font color="#000000">push_promise_end</font></b>(<b><font color="#000000">push_promise_end_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished receiving a promised request (server push). Promised requests never include a body.</p>
+<p>Promised requests received during the graceful shutdown of the connection get canceled immediately.</p>
+<!-- @todo The cancel event should probably trigger as well.-->
+<h3 id="_response_start">response_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">response_start_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>()
+}
+
+<b><font color="#000000">response_start</font></b>(<b><font color="#000000">response_start_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has begun receiving a response.</p>
+<h3 id="_response_inform">response_inform</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">response_headers_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">status</font> <font color="#990000">:=</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]
+}
+
+<b><font color="#000000">response_inform</font></b>(<b><font color="#000000">response_headers_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has received an informational response (1xx status code).</p>
+<p>A <code>status</code> with value 101 indicates that the response has concluded as the stream will be upgraded to a new protocol.</p>
+<h3 id="_response_headers">response_headers</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">response_headers</font></b>(<b><font color="#000000">response_headers_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished receiving response headers.</p>
+<h3 id="_response_trailers">response_trailers</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">response_trailers_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]
+}
+
+<b><font color="#000000">response_trailers</font></b>(<b><font color="#000000">response_trailers_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has received response trailers.</p>
+<h3 id="_response_end">response_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">response_end_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>()
+}
+
+<b><font color="#000000">response_end</font></b>(<b><font color="#000000">response_end_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished receiving a response.</p>
+<h3 id="_ws_upgrade">ws_upgrade</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">ws_upgrade_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">opts</font> <font color="#990000">:=</font> <b><font color="#000000">gun:ws_opts</font></b>()
+}
+
+<b><font color="#000000">ws_upgrade</font></b>(<b><font color="#000000">ws_upgrade_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>A Websocket upgrade was requested.</p>
+<p>Success is indicated by a response (101 informational if HTTP/1.1, 2xx if HTTP/2) followed by a <code>protocol_changed</code> event.</p>
+<h3 id="_ws_recv_frame_start">ws_recv_frame_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">ws_recv_frame_start_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">frag_state</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:frag_state</font></b>(),
+ <font color="#FF6600">extensions</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:extensions</font></b>()
+}
+
+<b><font color="#000000">ws_recv_frame_start</font></b>(<b><font color="#000000">ws_recv_frame_start_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has begun receiving a Websocket frame.</p>
+<h3 id="_ws_recv_frame_header">ws_recv_frame_header</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">ws_recv_frame_header_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">frag_state</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:frag_state</font></b>(),
+ <font color="#FF6600">extensions</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:extensions</font></b>(),
+ <font color="#FF6600">type</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:frame_type</font></b>(),
+ <font color="#FF6600">rsv</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:rsv</font></b>(),
+ <font color="#FF6600">len</font> <font color="#990000">:=</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#FF6600">mask_key</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:mask_key</font></b>()
+}
+
+<b><font color="#000000">ws_recv_frame_header</font></b>(<b><font color="#000000">ws_recv_frame_header_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has received the header part of a Websocket frame.</p>
+<p>It will be immediately be followed by the frame&apos;s payload.</p>
+<h3 id="_ws_recv_frame_end">ws_recv_frame_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">ws_recv_frame_end_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">extensions</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:extensions</font></b>(),
+ <font color="#FF6600">close_code</font> <font color="#990000">:=</font> <font color="#000080">undefined</font> | <b><font color="#000000">cow_ws:close_code</font></b>(),
+ <font color="#FF6600">payload</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>()
+}
+
+<b><font color="#000000">ws_recv_frame_end</font></b>(<b><font color="#000000">ws_recv_frame_end_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished receiving a Websocket frame.</p>
+<h3 id="_ws_send_frame_start">ws_send_frame_start</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">ws_send_frame_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">extensions</font> <font color="#990000">:=</font> <b><font color="#000000">cow_ws:extensions</font></b>(),
+ <font color="#FF6600">frame</font> <font color="#990000">:=</font> <b><font color="#000000">gun:ws_frame</font></b>()
+}
+
+<b><font color="#000000">ws_send_frame_start</font></b>(<b><font color="#000000">ws_send_frame_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has started sending a Websocket frame.</p>
+<h3 id="_ws_send_frame_end">ws_send_frame_end</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">ws_send_frame_end</font></b>(<b><font color="#000000">ws_send_frame_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has finished sending a Websocket frame.</p>
+<h3 id="_protocol_changed">protocol_changed</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">protocol_changed_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">protocol</font> <font color="#990000">:=</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font> | <font color="#FF6600">raw</font> | <font color="#FF6600">ws</font>
+}
+
+<b><font color="#000000">protocol_changed</font></b>(<b><font color="#000000">protocol_changed_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>The protocol has changed for either the entire Gun connection or for a specific stream.</p>
+<p>The <code>stream_ref</code> key is only set when the protocol has changed for a specific stream or inside a CONNECT tunnel.</p>
+<p>This event occurs during successful Websocket upgrades, as a result of successful CONNECT requests or after a SOCKS tunnel was successfully established.</p>
+<h3 id="_origin_changed">origin_changed</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">origin_changed_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">stream_ref</font> <font color="#990000">=&gt;</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">type</font> <font color="#990000">:=</font> <font color="#FF6600">connect</font> | <font color="#FF6600">socks5</font>,
+ <font color="#FF6600">origin_scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(),
+ <font color="#FF6600">origin_host</font> <font color="#990000">:=</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#FF6600">origin_port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>()
+}
+
+<b><font color="#000000">origin_changed</font></b>(<b><font color="#000000">origin_changed_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>The origin server has changed for either the Gun connection or for a specific stream.</p>
+<p>The <code>stream_ref</code> key is only set when the origin has changed for a specific stream or inside a CONNECT tunnel.</p>
+<h3 id="_cancel">cancel</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">cancel_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">stream_ref</font> <font color="#990000">:=</font> <b><font color="#000000">gun:stream_ref</font></b>(),
+ <font color="#FF6600">reply_to</font> <font color="#990000">:=</font> <b><font color="#000080">pid</font></b>(),
+ <font color="#FF6600">endpoint</font> <font color="#990000">:=</font> <font color="#FF6600">local</font> | <font color="#FF6600">remote</font>,
+ <font color="#FF6600">reason</font> <font color="#990000">:=</font> <b><font color="#000080">atom</font></b>()
+}
+
+<b><font color="#000000">cancel</font></b>(<b><font color="#000000">cancel_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>A stream has been canceled.</p>
+<p>HTTP/1.1 streams can&apos;t be canceled at the protocol level. In this case Gun will silence the stream for the user but events may still occur.</p>
+<p>HTTP/2 streams can be canceled both by the client and the server. Events may still occur for a short time after the stream has been canceled.</p>
+<h3 id="_disconnect">disconnect</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">disconnect_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">reason</font> <font color="#990000">:=</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">closed</font> | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}
+}
+
+<b><font color="#000000">disconnect</font></b>(<b><font color="#000000">disconnect_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun has been disconnected from the server.</p>
+<h3 id="_terminate">terminate</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">terminate_event</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">state</font> <font color="#990000">:=</font> <font color="#FF6600">not_connected</font>
+ | <font color="#FF6600">domain_lookup</font> | <font color="#FF6600">connecting</font> | <font color="#FF6600">initial_tls_handshake</font> | <font color="#FF6600">tls_handshake</font>
+ | <font color="#FF6600">connected</font> | <font color="#FF6600">connected_data_only</font> | <font color="#FF6600">connected_ws_only</font>,
+ <font color="#FF6600">reason</font> <font color="#990000">:=</font> <b><font color="#000080">normal</font></b> | <font color="#000080">shutdown</font> | {<font color="#000080">shutdown</font>, <b><font color="#000000">any</font></b>()} | <b><font color="#000000">any</font></b>()
+}
+
+<b><font color="#000000">terminate</font></b>(<b><font color="#000000">terminate_event</font></b>(), <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">State</font></tt></pre>
+</div></div>
+<p>Gun is terminating.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: Module introduced.
+</li>
+</ul>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">gun(7)</a>, <a href="../gun">gun(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/gun/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/gun/1.2/manual">1.2</a></li>
+
+ <li><a href="/docs/en/gun/1.1/manual">1.1</a></li>
+
+ <li><a href="/docs/en/gun/1.0/manual">1.0</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/2.0/manual/gun_inform/index.html b/docs/en/gun/2.0/manual/gun_inform/index.html
index b5207ec6..655ce50d 100644
--- a/docs/en/gun/2.0/manual/gun_inform/index.html
+++ b/docs/en/gun/2.0/manual/gun_inform/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_inform</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Status</font> <font color="#990000">::</font> <font color="#993399">100</font><font color="#990000">..</font><font color="#993399">199</font>
<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
</div></div>
diff --git a/docs/en/gun/2.0/manual/gun_push/index.html b/docs/en/gun/2.0/manual/gun_push/index.html
index 383f6c04..3a1bfd27 100644
--- a/docs/en/gun/2.0/manual/gun_push/index.html
+++ b/docs/en/gun/2.0/manual/gun_push/index.html
@@ -72,8 +72,8 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_push</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">NewStreamRef</font>, <font color="#009900">Method</font>, <font color="#009900">URI</font>, <font color="#009900">Headers</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
-<font color="#009900">NewStreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
+<font color="#009900">NewStreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
<font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
diff --git a/docs/en/gun/2.0/manual/gun_response/index.html b/docs/en/gun/2.0/manual/gun_response/index.html
index 92083f34..c995e535 100644
--- a/docs/en/gun/2.0/manual/gun_response/index.html
+++ b/docs/en/gun/2.0/manual/gun_response/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_response</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font>
<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
diff --git a/docs/en/gun/2.0/manual/gun_trailers/index.html b/docs/en/gun/2.0/manual/gun_trailers/index.html
index ac9b7a60..45351e6a 100644
--- a/docs/en/gun/2.0/manual/gun_trailers/index.html
+++ b/docs/en/gun/2.0/manual/gun_trailers/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_trailers</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Headers</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
</div></div>
<p>Response trailers.</p>
diff --git a/docs/en/gun/2.0/manual/gun_socks_up/index.html b/docs/en/gun/2.0/manual/gun_tunnel_up/index.html
index 2e008e8d..d68424cb 100644
--- a/docs/en/gun/2.0/manual/gun_socks_up/index.html
+++ b/docs/en/gun/2.0/manual/gun_tunnel_up/index.html
@@ -7,7 +7,7 @@
<meta name="description" content="">
<meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
- <title>Nine Nines: gun_socks_up(3)</title>
+ <title>Nine Nines: gun_tunnel_up(3)</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
<link href="/css/99s.css?r=7" rel="stylesheet">
@@ -60,28 +60,31 @@
<div class="row">
<div id="docs" class="span9 maincol">
-<h1 class="lined-header"><span>gun_socks_up(3)</span></h1>
+<h1 class="lined-header"><span>gun_tunnel_up(3)</span></h1>
<h2 id="_name">Name</h2>
-<p>gun_socks_up - The Socks connection is up</p>
+<p>gun_tunnel_up - The tunnel is up</p>
<h2 id="_description">Description</h2>
<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt>{<font color="#FF6600">gun_socks_up</font>, <font color="#009900">ConnPid</font>, <font color="#009900">Protocol</font>}
+<pre><tt>{<font color="#FF6600">gun_tunnel_up</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Protocol</font>}
-<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font></tt></pre>
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>() | <font color="#000080">undefined</font>
+<font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">socks</font></tt></pre>
</div></div>
-<p>The Socks connection is up.</p>
-<p>This message informs the owner/calling process that the connection completed through the configured Socks proxy.</p>
-<p>If Gun is configured to connect to another Socks server, then the connection is not usable yet. One or more <a href="../gun_socks_up">gun_socks_up(3)</a> messages will follow.</p>
-<p>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.</p>
+<p>The tunnel is up.</p>
+<p>This message informs the owner/calling process that the connection completed through the SOCKS or CONNECT proxy.</p>
+<p>If Gun is configured to connect to another SOCKS server, then the connection is not usable yet. One or more <a href="../gun_tunnel_up">gun_tunnel_up(3)</a> messages will follow.</p>
<h2 id="_elements">Elements</h2>
<dl><dt>ConnPid</dt>
<dd><p>The pid of the Gun connection process.</p>
</dd>
+<dt>StreamRef</dt>
+<dd><p>The stream reference the tunnel is running on, or <code>undefined</code> if there are no underlying stream.</p>
+</dd>
<dt>Protocol</dt>
<dd><p>The protocol selected for this connection. It can be used to determine the capabilities of the server.</p>
</dd>
@@ -91,12 +94,12 @@ http://www.gnu.org/software/src-highlite -->
</li>
</ul>
<h2 id="_examples">Examples</h2>
-<div class="listingblock"><div class="title">Receive a gun_socks_up message in a gen_server</div>
+<div class="listingblock"><div class="title">Receive a gun_tunnel_up message in a gen_server</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_socks_up</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_Protocol</font>},
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_tunnel_up</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>, <font color="#009900">_Protocol</font>},
<font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
<i><font color="#9A1900">%% Do something.</font></i>
{<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
diff --git a/docs/en/gun/2.0/manual/gun_up/index.html b/docs/en/gun/2.0/manual/gun_up/index.html
index 8628c89a..f06ada2a 100644
--- a/docs/en/gun/2.0/manual/gun_up/index.html
+++ b/docs/en/gun/2.0/manual/gun_up/index.html
@@ -76,7 +76,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>The connection is up.</p>
<p>This message informs the owner process that the connection or reconnection completed.</p>
-<p>If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more <a href="../gun_socks_up">gun_socks_up(3)</a> messages will follow.</p>
+<p>If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more <a href="../gun_tunnel_up">gun_tunnel_up(3)</a> messages will follow.</p>
<p>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.</p>
<h2 id="_elements">Elements</h2>
<dl><dt>ConnPid</dt>
@@ -102,7 +102,7 @@ http://www.gnu.org/software/src-highlite -->
{<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
<h2 id="_see_also">See also</h2>
-<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_socks_up">gun_socks_up(3)</a>, <a href="../gun_down">gun_down(3)</a>, <a href="../gun_error">gun_error(3)</a></p>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_tunnel_up">gun_tunnel_up(3)</a>, <a href="../gun_down">gun_down(3)</a>, <a href="../gun_error">gun_error(3)</a></p>
diff --git a/docs/en/gun/2.0/manual/gun_upgrade/index.html b/docs/en/gun/2.0/manual/gun_upgrade/index.html
index f0eb8cf4..f5930c2f 100644
--- a/docs/en/gun/2.0/manual/gun_upgrade/index.html
+++ b/docs/en/gun/2.0/manual/gun_upgrade/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_upgrade</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Protocols</font>, <font color="#009900">Headers</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Protocols</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"websocket"</font><font color="#990000">&gt;&gt;</font>]
<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
</div></div>
diff --git a/docs/en/gun/2.0/manual/gun_ws/index.html b/docs/en/gun/2.0/manual/gun_ws/index.html
index 1104813b..1bb62a49 100644
--- a/docs/en/gun/2.0/manual/gun_ws/index.html
+++ b/docs/en/gun/2.0/manual/gun_ws/index.html
@@ -72,7 +72,7 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt>{<font color="#FF6600">gun_ws</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Frame</font>}
<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
-<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000000">gun:stream_ref</font></b>()
<font color="#009900">Frame</font> <font color="#990000">::</font> <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>
| {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">close</font>, <b><font color="#000080">binary</font></b>()}
| {<font color="#FF6600">close</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}
diff --git a/docs/en/gun/2.0/manual/index.html b/docs/en/gun/2.0/manual/index.html
index 70ff07c7..3a4b3603 100644
--- a/docs/en/gun/2.0/manual/index.html
+++ b/docs/en/gun/2.0/manual/index.html
@@ -74,6 +74,8 @@
</li>
<li><a href="gun_cookies_list">gun_cookies_list(3)</a> - Cookie store backend: in-memory, per connection
</li>
+<li><a href="gun_event">gun_event(3)</a> - Events
+</li>
</ul>
<h2 id="_dependencies">Dependencies</h2>
<ul><li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
diff --git a/docs/index.html b/docs/index.html
index c7815a72..2c94fd1d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -120,6 +120,11 @@
+ <li><a href="/docs/en/cowlib/2.10/manual">Cowlib 2.10 Function Reference</a></li>
+
+
+
+
<li><a href="/docs/en/cowlib/2.9/manual">Cowlib 2.9 Function Reference</a></li>
diff --git a/docs/index.xml b/docs/index.xml
index b3d14cd6..f9127005 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -82,7 +82,7 @@ Prerequisites Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocke
Supported platforms Gun is tested and supported on Linux, FreeBSD, Windows and OSX.
Gun is developed for Erlang/OTP 22.0 and newer.
License Gun uses the ISC License.
-Copyright (c) 2013-2019, Loïc Hoguin &amp;lt;[email protected]&amp;gt; Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.</description>
+Copyright (c) 2013-2020, Loïc Hoguin &amp;lt;[email protected]&amp;gt; Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.</description>
</item>
<item>
@@ -1047,6 +1047,16 @@ POTENTIAL SECURITY VULNERABILITY: Fix transfer-encoding precedence over content-
</item>
<item>
+ <title>Internals: TLS over TLS</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/</guid>
+ <description>The ssl application that comes with Erlang/OTP implements TLS using an interface equivalent to the gen_tcp interface: you get and manipulate a socket. The TLS encoding and decoding is applied transparently to the data sent and received.
+In order to have a TLS layer inside another TLS layer we need a way to encode the data of the inner layer before we pass it to the outer layer. We cannot do this with a socket interface.</description>
+ </item>
+
+ <item>
<title>Migrating from Gun 1.0 to 1.1</title>
<link>https://ninenines.eu/docs/en/gun/1.1/guide/migrating_from_1.0/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1067,17 +1077,6 @@ Features added CONNECT requests can now be issued on HTTP/1.1 connections. The t
</item>
<item>
- <title>Migrating from Gun 1.3 to 2.0</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</guid>
- <description>Gun 2.0 adds many features including graceful shutdown, flow control for data messages, event handlers, support for tunneling TLS connections through TLS proxies, Socks proxy support, and much more. It has only a limited number of breaking changes compared to the previous version.
-Gun 2.0 greatly improves the HTTP/2 performance when it comes to receiving large response bodies; and when receiving response bodies from many separate requests concurrently.
-Gun now shares much of its HTTP/2 code with Cowboy, including the HTTP/2 state machine.</description>
- </item>
-
- <item>
<title>Listeners</title>
<link>https://ninenines.eu/docs/en/cowboy/2.3/guide/listeners/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1336,13 +1335,13 @@ Features added The protocols CONNECT destination option has been added as a repl
</item>
<item>
- <title>Migrating from Gun 1.2 to 1.3</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</link>
+ <title>Migrating from Gun 1.3 to 2.0</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</guid>
- <description>Gun 1.3 improves the support for CONNECT requests introduced in the previous version and documents Websocket protocol negotiation.
-Features added The protocols CONNECT destination option has been added as a replacement for the now deprecated protocol option. Add built-in support for Websocket protocol negotiation through the Websocket option protocols. The interface of the handler module currently remains undocumented and must be set to gun_ws_h. Add the h2specd HTTP/2 test suite from the h2spec project.</description>
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</guid>
+ <description>Gun 2.0 includes state of the art tunnel support. With Gun 2.0 it is possible to make request or data go through any number of proxy endpoints using any combination of TCP or TLS transports and HTTP/1.1, HTTP/2 or SOCKS5 protocols. All combinations of the scenario Proxy1 -&amp;gt; Proxy2 -&amp;gt; Origin are tested and known to work.
+Gun 2.0 adds many more features such as Websocket over HTTP/2, a built-in cookie store, graceful shutdown, flow control for data messages, event handlers and more.</description>
</item>
<item>
@@ -1458,16 +1457,6 @@ Features added CONNECT requests can now be issued on HTTP/1.1 connections. The t
</item>
<item>
- <title>Migrating from Gun 1.1 to 1.2</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</guid>
- <description>Gun 1.2 adds support for the CONNECT request over HTTP/1.1 connections.
-Features added CONNECT requests can now be issued on HTTP/1.1 connections. The tunneled connection can use any of the protocols Gun supports: HTTP/1.1, HTTP/2 and Websocket over both TCP and TLS transports. Note that Gun currently does not support tunneling a TLS connection over a TLS connection due to limitations in Erlang/OTP. Gun supports sending multiple CONNECT requests, allowing the tunnel to the origin server to go through multiple proxies.</description>
- </item>
-
- <item>
<title>Handlers</title>
<link>https://ninenines.eu/docs/en/cowboy/2.3/guide/handlers/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1546,6 +1535,16 @@ init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No
</item>
<item>
+ <title>Migrating from Gun 1.2 to 1.3</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</guid>
+ <description>Gun 1.3 improves the support for CONNECT requests introduced in the previous version and documents Websocket protocol negotiation.
+Features added The protocols CONNECT destination option has been added as a replacement for the now deprecated protocol option. Add built-in support for Websocket protocol negotiation through the Websocket option protocols. The interface of the handler module currently remains undocumented and must be set to gun_ws_h. Add the h2specd HTTP/2 test suite from the h2spec project.</description>
+ </item>
+
+ <item>
<title>Migrating from Ranch 1.7 to Ranch 2.0</title>
<link>https://ninenines.eu/docs/en/ranch/2.0/guide/migrating_from_1.7/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1648,13 +1647,13 @@ Features added Update Cowlib to 2.5.1 Bugs fixed A bug in the experimental gun
</item>
<item>
- <title>Migrating from Gun 1.0 to 1.1</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</link>
+ <title>Migrating from Gun 1.1 to 1.2</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</guid>
- <description>Gun 1.1 updates the Cowlib dependency to 2.5.1 and fixes a few problems with experimental features.
-Features added Update Cowlib to 2.5.1 Bugs fixed A bug in the experimental gun_sse_h where lone id lines were not propagated has been fixed by updating the Cowlib dependency. The status code was incorrectly given to the experimental content handlers as a binary. It has been fixed an an integer is now given as was intended.</description>
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</guid>
+ <description>Gun 1.2 adds support for the CONNECT request over HTTP/1.1 connections.
+Features added CONNECT requests can now be issued on HTTP/1.1 connections. The tunneled connection can use any of the protocols Gun supports: HTTP/1.1, HTTP/2 and Websocket over both TCP and TLS transports. Note that Gun currently does not support tunneling a TLS connection over a TLS connection due to limitations in Erlang/OTP. Gun supports sending multiple CONNECT requests, allowing the tunnel to the origin server to go through multiple proxies.</description>
</item>
<item>
@@ -1757,6 +1756,16 @@ While a third-party library already existed, it was not entirely compatible with
</item>
<item>
+ <title>Migrating from Gun 1.0 to 1.1</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</guid>
+ <description>Gun 1.1 updates the Cowlib dependency to 2.5.1 and fixes a few problems with experimental features.
+Features added Update Cowlib to 2.5.1 Bugs fixed A bug in the experimental gun_sse_h where lone id lines were not propagated has been fixed by updating the Cowlib dependency. The status code was incorrectly given to the experimental content handlers as a binary. It has been fixed an an integer is now given as was intended.</description>
+ </item>
+
+ <item>
<title>The Req object</title>
<link>https://ninenines.eu/docs/en/cowboy/2.3/guide/req/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3148,6 +3157,17 @@ HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message He
<item>
<title>cow_cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie/</guid>
+ <description>Name cow_cookie - Cookies
+Description The module cow_cookie provides functions for parsing and manipulating cookie headers.
+Exports cow_cookie:parse_cookie(3) - Parse a cookie header cow_cookie:parse_set_cookie(3) - Parse a set-cookie header cow_cookie:cookie(3) - Generate a cookie header cow_cookie:setcookie(3) - Generate a set-cookie header Types cookie_attrs() cookie_attrs() :: #{ expires =&amp;gt; calendar:datetime(), max_age =&amp;gt; calendar:datetime(), domain =&amp;gt; binary(), path =&amp;gt; binary(), secure =&amp;gt; true, http_only =&amp;gt; true, same_site =&amp;gt; strict | lax | none } Cookie attributes parsed from the set-cookie header.</description>
+ </item>
+
+ <item>
+ <title>cow_cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3170,6 +3190,19 @@ Exports cow_cookie:parse_cookie(3) - Parse a cookie header cow_cookie:parse_set
<item>
<title>cow_cookie:cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.cookie/</guid>
+ <description>Name cow_cookie:cookie - Generate a cookie header
+Description cookie(Cookies) -&amp;gt; iolist() Cookies :: [{Name :: iodata(), Value :: iodata()}] Generate a cookie header.
+Arguments Cookies A list of pairs of cookie name and value.
+ Return value An iolist with the generated cookie header value.
+Changelog 2.9: Function introduced. Examples Generate a cookie header Cookie = cow_cookie:cookie([{&amp;lt;&amp;lt;&#34;sessionid&#34;&amp;gt;&amp;gt;, ID}]). See also cow_cookie(3), cow_cookie:parse_cookie(3), cow_cookie:parse_set_cookie(3), cow_cookie:setcookie(3)</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.9/manual/cow_cookie.cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3183,6 +3216,20 @@ Changelog 2.9: Function introduced. Examples Generate a cookie header Cookie =
<item>
<title>cow_cookie:parse_cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/</guid>
+ <description>Name cow_cookie:parse_cookie - Parse a cookie header
+Description parse_cookie(Cookie :: binary()) -&amp;gt; [{binary(), binary()}] Parse a cookie header.
+Arguments Cookie The cookie header value.
+ Return value A list of cookie name/value pairs is returned on success.
+An exception is thrown in the event of a parse error.
+Changelog 2.9: Fixes to the parser may lead to potential incompatibilities. A cookie name starting with $ is no longer ignored.</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:parse_cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3211,6 +3258,19 @@ Changelog 2.9: Fixes to the parser may lead to potential incompatibilities. A co
<item>
<title>cow_cookie:parse_set_cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/</guid>
+ <description>Name cow_cookie:parse_set_cookie - Parse a set-cookie header
+Description parse_set_cookie(SetCookie :: binary()) -&amp;gt; {ok, Name, Value, Attrs} | ignore Name :: binary() Value :: binary() Attrs :: cow_cookie:cookie_attrs() Parse a set-cookie header.
+Arguments SetCookie The set-cookie header value.
+ Return value An ok tuple with the cookie name, value and attributes is returned on success.
+An atom ignore is returned when the cookie has both an empty name and an empty value, and must be ignored.</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:parse_set_cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3224,6 +3284,21 @@ An atom ignore is returned when the cookie has both an empty name and an empty v
<item>
<title>cow_cookie:setcookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/</guid>
+ <description>Name cow_cookie:setcookie - Generate a set-cookie header
+Description setcookie(Name :: iodata(), Value :: iodata(), Opts :: cow_cookie:cookie_opts()) -&amp;gt; iolist() Generate a set-cookie header.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Opts Options added to the set-cookie header as attributes.
+ Return value An iolist with the generated set-cookie header value.
+Changelog 1.0: Function introduced. Examples Generate a set-cookie header SetCookie = cow_cookie:setcookie(&amp;lt;&amp;lt;&#34;sessionid&#34;&amp;gt;&amp;gt;, ID, #{ http_only =&amp;gt; true, secure =&amp;gt; true }).</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:setcookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -8591,6 +8666,18 @@ init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, R
<item>
<title>Cowlib Function Reference</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/</guid>
+ <description>Name cowlib - Support library for manipulating Web protocols
+Description Cowlib provides libraries for parsing and building messages for various Web protocols, including HTTP/1.1, HTTP/2 and Websocket.
+It is optimized for completeness rather than speed. No value is ignored, they are all returned.
+Modules cow_cookie(3) - Cookies Dependencies crypto - Crypto functions All these applications must be started before the cowlib application. To start Cowlib and all dependencies at once:</description>
+ </item>
+
+ <item>
+ <title>Cowlib Function Reference</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -8615,6 +8702,18 @@ Modules cow_cookie(3) - Cookies Dependencies crypto - Crypto functions All t
<item>
<title>cowlib(7)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cowlib_app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cowlib_app/</guid>
+ <description>Name cowlib - Support library for manipulating Web protocols
+Description Cowlib provides libraries for parsing and building messages for various Web protocols, including HTTP/1.1, HTTP/2 and Websocket.
+It is optimized for completeness rather than speed. No value is ignored, they are all returned.
+Modules cow_cookie(3) - Cookies Dependencies crypto - Crypto functions All these applications must be started before the cowlib application. To start Cowlib and all dependencies at once:</description>
+ </item>
+
+ <item>
+ <title>cowlib(7)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cowlib_app/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -8694,7 +8793,7 @@ Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support lib
<description>Name gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP
Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
-Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
+Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection gun_event(3) - Events Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
</item>
<item>
@@ -8739,7 +8838,7 @@ Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/gun/2.0/guide/</guid>
- <description>Interface Introduction Starting and stopping Supported protocols Connection Using HTTP Using Websocket Additional information Migrating from Gun 1.3 to 2.0 Migrating from Gun 1.2 to 1.3 Migrating from Gun 1.1 to 1.2 Migrating from Gun 1.0 to 1.1 </description>
+ <description>Interface Introduction Starting and stopping Supported protocols Connection Using HTTP Using Websocket Advanced Internals: TLS over TLS Additional information Migrating from Gun 1.3 to 2.0 Migrating from Gun 1.2 to 1.3 Migrating from Gun 1.1 to 1.2 Migrating from Gun 1.0 to 1.1 </description>
</item>
<item>
@@ -8859,7 +8958,7 @@ Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support lib
<description>Name gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP
Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
-Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
+Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection gun_event(3) - Events Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
</item>
<item>
@@ -8913,7 +9012,7 @@ This function waits for a message from the given stream and returns it as a tupl
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.await/</guid>
<description>Name gun:await - Wait for a response
-Description await(ConnPid, StreamRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, MonitorRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, Timeout) -&amp;gt; await(ConnPid, StreamRef, Timeout, MonitorRef) await(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; Result ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Result :: tuple() - see below Wait for a response.
+Description await(ConnPid, StreamRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, MonitorRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, Timeout) -&amp;gt; await(ConnPid, StreamRef, Timeout, MonitorRef) await(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; Result ConnPid :: pid() StreamRef :: gun:stream_ref() MonitorRef :: reference() Timeout :: timeout() Result :: tuple() - see below Wait for a response.
This function waits for a message from the given stream and returns it as a tuple.</description>
</item>
@@ -8964,7 +9063,7 @@ Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamR
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.await_body/</guid>
<description>Name gun:await_body - Wait for the complete response body
-Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, MonitorRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, Timeout) -&amp;gt; await_body(ConnPid, StreamRef, Timeout, MonitorRef) await_body(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; {ok, Body} | {ok, Body, Trailers} | {error, Reason} ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Body :: binary() Trailers :: [{binary(), binary()}] Reason :: {stream_error | connection_error | down, any()} | timeout Wait for the complete response body.</description>
+Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, MonitorRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, Timeout) -&amp;gt; await_body(ConnPid, StreamRef, Timeout, MonitorRef) await_body(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; {ok, Body} | {ok, Body, Trailers} | {error, Reason} ConnPid :: pid() StreamRef :: gun:stream_ref() MonitorRef :: reference() Timeout :: timeout() Body :: binary() Trailers :: [{binary(), binary()}] Reason :: {stream_error | connection_error | down, any()} | timeout Wait for the complete response body.</description>
</item>
<item>
@@ -9077,7 +9176,7 @@ HTTP/1.1 does not support this feature. Gun will simply silence the stream and s
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.cancel/</guid>
<description>Name gun:cancel - Cancel the given stream
-Description cancel(ConnPid, StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Cancel the given stream.
+Description cancel(ConnPid, StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Cancel the given stream.
The behavior of this function depends on the protocol selected.
HTTP/1.1 does not support this feature. Gun will simply silence the stream and stop relaying messages. Gun may also decide to close the connection if the response body is too large, to avoid wasting time and bandwidth.</description>
</item>
@@ -9176,7 +9275,7 @@ This feature is currently only available for HTTP/1.1 connections. Upon successf
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.connect/</guid>
<description>Name gun:connect - Establish a tunnel to the origin server
-Description connect(ConnPid, Destination) -&amp;gt; connect(ConnPid, Destination, [], #{}). connect(ConnPid, Destination, Headers) -&amp;gt; connect(ConnPid, Destination, Headers, #{}). connect(ConnPid, Destination, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Destination :: gun:connect_destination() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Establish a tunnel to the origin server.
+Description connect(ConnPid, Destination) -&amp;gt; connect(ConnPid, Destination, [], #{}). connect(ConnPid, Destination, Headers) -&amp;gt; connect(ConnPid, Destination, Headers, #{}). connect(ConnPid, Destination, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Destination :: gun:connect_destination() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Establish a tunnel to the origin server.
This feature is currently only available for HTTP/1.1 connections. Upon successful completion of the CONNECT request a tunnel is established and subsequent requests will go through the tunnel.</description>
</item>
@@ -9235,7 +9334,7 @@ All calls to this function must use the nofin flag except for the last which mus
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.data/</guid>
<description>Name gun:data - Stream the body of a request
-Description data(ConnPid, StreamRef, IsFin, Data) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: iodata() Stream the body of a request.
+Description data(ConnPid, StreamRef, IsFin, Data) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() IsFin :: fin | nofin Data :: iodata() Stream the body of a request.
This function can only be used if the original request had headers indicating that a body would be streamed.
All calls to this function must use the nofin flag except for the last which must use fin to indicate the end of the request body.</description>
</item>
@@ -9303,7 +9402,7 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.delete/</guid>
<description>Name gun:delete - Delete a resource
-Description delete(ConnPid, Path) -&amp;gt; delete(ConnPid, Path, [], #{}). delete(ConnPid, Path, Headers) -&amp;gt; delete(ConnPid, Path, Headers, #{}) delete(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Delete a resource.
+Description delete(ConnPid, Path) -&amp;gt; delete(ConnPid, Path, [], #{}). delete(ConnPid, Path, Headers) -&amp;gt; delete(ConnPid, Path, Headers, #{}) delete(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Delete a resource.
Arguments ConnPid The pid of the Gun connection process.
Path Path to the resource.
Headers Additional request headers.
@@ -9373,7 +9472,7 @@ ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.flush/</guid>
<description>Name gun:flush - Flush all messages related to a connection or a stream
-Description flush(ConnPid) -&amp;gt; ok flush(StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Flush all messages related to a connection or a stream.
+Description flush(ConnPid) -&amp;gt; ok flush(StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Flush all messages related to a connection or a stream.
Arguments Either of these arguments may be provided:
ConnPid The pid of the Gun connection process.
StreamRef Identifier of the stream for the original request.
@@ -9439,7 +9538,7 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.get/</guid>
<description>Name gun:get - Get a resource representation
-Description get(ConnPid, Path) -&amp;gt; get(ConnPid, Path, [], #{}). get(ConnPid, Path, Headers) -&amp;gt; get(ConnPid, Path, Headers, #{}) get(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Get a resource representation.
+Description get(ConnPid, Path) -&amp;gt; get(ConnPid, Path, [], #{}). get(ConnPid, Path, Headers) -&amp;gt; get(ConnPid, Path, Headers, #{}) get(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Get a resource representation.
Arguments ConnPid The pid of the Gun connection process.
Path Path to the resource.
Headers Additional request headers.
@@ -9497,7 +9596,7 @@ This function performs the same operation as gun:get(3), except the server will
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.head/</guid>
<description>Name gun:head - Get headers of a resource representation
-Description head(ConnPid, Path) -&amp;gt; head(ConnPid, Path, [], #{}). head(ConnPid, Path, Headers) -&amp;gt; head(ConnPid, Path, Headers, #{}) head(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Get headers of a resource representation.
+Description head(ConnPid, Path) -&amp;gt; head(ConnPid, Path, [], #{}). head(ConnPid, Path, Headers) -&amp;gt; head(ConnPid, Path, Headers, #{}) head(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Get headers of a resource representation.
This function performs the same operation as gun:get(3), except the server will not send the resource representation, only the response&amp;apos;s status code and headers.</description>
</item>
@@ -9508,7 +9607,7 @@ This function performs the same operation as gun:get(3), except the server will
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.headers/</guid>
<description>Name gun:headers - Initiate the given request
-Description headers(ConnPid, Method, Path, Headers) -&amp;gt; headers(ConnPid, Method, Path, Headers, #{}) headers(ConnPid, Method, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Initiate the given request.
+Description headers(ConnPid, Method, Path, Headers) -&amp;gt; headers(ConnPid, Method, Path, Headers, #{}) headers(ConnPid, Method, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Initiate the given request.
This is a general purpose function that should only be used when other method-specific functions do not apply.
The function headers/4,5 initiates a request but does not send the request body.</description>
</item>
@@ -9569,7 +9668,7 @@ Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ socket =&am
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.info/</guid>
<description>Name gun:info - Obtain information about the connection
-Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ owner =&amp;gt; pid(), socket =&amp;gt; inet:socket() | ssl:sslsocket(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | ws, sock_ip =&amp;gt; inet:ip_address(), sock_port =&amp;gt; inet:port_number(), origin_host =&amp;gt; inet:hostname() | inet:ip_address(), origin_port =&amp;gt; inet:port_number(), intermediaries =&amp;gt; [Intermediary], cookie_store =&amp;gt; gun_cookies:cookie_store() } Intermediary :: #{ type =&amp;gt; connect | socks5, host =&amp;gt; inet:hostname() | inet:ip_address(), port =&amp;gt; inet:port_number(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks } Obtain information about the connection.</description>
+Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ owner =&amp;gt; pid(), socket =&amp;gt; inet:socket() | ssl:sslsocket(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | ws, sock_ip =&amp;gt; inet:ip_address(), sock_port =&amp;gt; inet:port_number(), origin_scheme =&amp;gt; binary() | undefined, origin_host =&amp;gt; inet:hostname() | inet:ip_address(), origin_port =&amp;gt; inet:port_number(), intermediaries =&amp;gt; [Intermediary], cookie_store =&amp;gt; gun_cookies:cookie_store() } Intermediary :: #{ type =&amp;gt; connect | socks5, host =&amp;gt; inet:hostname() | inet:ip_address(), port =&amp;gt; inet:port_number(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | raw } Obtain information about the connection.</description>
</item>
<item>
@@ -9750,7 +9849,7 @@ The special path &amp;quot;*&amp;quot; can be used to obtain information about t
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.options/</guid>
<description>Name gun:options - Query the capabilities of the server or a resource
-Description options(ConnPid, Path) -&amp;gt; options(ConnPid, Path, [], #{}). options(ConnPid, Path, Headers) -&amp;gt; options(ConnPid, Path, Headers, #{}) options(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Query the capabilities of the server or a resource.
+Description options(ConnPid, Path) -&amp;gt; options(ConnPid, Path, [], #{}). options(ConnPid, Path, Headers) -&amp;gt; options(ConnPid, Path, Headers, #{}) options(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Query the capabilities of the server or a resource.
The special path &amp;quot;*&amp;quot; can be used to obtain information about the server as a whole.</description>
</item>
@@ -9805,7 +9904,7 @@ The behavior of this function varies depending on whether a body is provided.</d
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.patch/</guid>
<description>Name gun:patch - Apply a set of changes to a resource
-Description patch(ConnPid, Path, Headers) -&amp;gt; patch(ConnPid, Path, Headers, #{}) patch(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef patch(ConnPid, Path, Headers, Body) -&amp;gt; patch(ConnPid, Path, Headers, Body, #{}) patch(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Apply a set of changes to a resource.</description>
+Description patch(ConnPid, Path, Headers) -&amp;gt; patch(ConnPid, Path, Headers, #{}) patch(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef patch(ConnPid, Path, Headers, Body) -&amp;gt; patch(ConnPid, Path, Headers, Body, #{}) patch(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Apply a set of changes to a resource.</description>
</item>
<item>
@@ -9859,7 +9958,7 @@ The behavior of this function varies depending on whether a body is provided.</d
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.post/</guid>
<description>Name gun:post - Process the enclosed representation according to a resource&amp;apos;s own semantics
-Description post(ConnPid, Path, Headers) -&amp;gt; post(ConnPid, Path, Headers, #{}) post(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef post(ConnPid, Path, Headers, Body) -&amp;gt; post(ConnPid, Path, Headers, Body, #{}) post(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Process the enclosed representation according to a resource&amp;apos;s own semantics.</description>
+Description post(ConnPid, Path, Headers) -&amp;gt; post(ConnPid, Path, Headers, #{}) post(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef post(ConnPid, Path, Headers, Body) -&amp;gt; post(ConnPid, Path, Headers, Body, #{}) post(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Process the enclosed representation according to a resource&amp;apos;s own semantics.</description>
</item>
<item>
@@ -9917,7 +10016,7 @@ The function put/3 expects either a content-length or content-type header to ind
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.put/</guid>
<description>Name gun:put - Create or replace a resource
-Description put(ConnPid, Path, Headers) -&amp;gt; put(ConnPid, Path, Headers, #{}) put(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef put(ConnPid, Path, Headers, Body) -&amp;gt; put(ConnPid, Path, Headers, Body, #{}) put(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Create or replace a resource.
+Description put(ConnPid, Path, Headers) -&amp;gt; put(ConnPid, Path, Headers, #{}) put(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef put(ConnPid, Path, Headers, Body) -&amp;gt; put(ConnPid, Path, Headers, Body, #{}) put(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Create or replace a resource.
The behavior of this function varies depending on whether a body is provided.</description>
</item>
@@ -9972,7 +10071,7 @@ This is a general purpose function that should only be used when other method-sp
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.request/</guid>
<description>Name gun:request - Perform the given request
-Description request(ConnPid, Method, Path, Headers, Body) -&amp;gt; request(ConnPid, Method, Path, Headers, Body, #{}) request(ConnPid, Method, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Perform the given request.
+Description request(ConnPid, Method, Path, Headers, Body) -&amp;gt; request(ConnPid, Method, Path, Headers, Body, #{}) request(ConnPid, Method, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Perform the given request.
This is a general purpose function that should only be used when other method-specific functions do not apply.</description>
</item>
@@ -10009,10 +10108,7 @@ For HTTP/1.1 there is no such mechanism and Gun will close the connection once t
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.stream_info/</guid>
<description>Name gun:stream_info - Obtain information about a stream
-Description stream_info(ConnPid, StreamRef) -&amp;gt; {ok, undefined | Info} | {error, not_connected} ConnPid :: pid() StreamRef :: reference() Info :: #{ ref =&amp;gt; reference(), reply_to =&amp;gt; pid(), state =&amp;gt; running | stopping } Obtain information about a stream.
-Arguments ConnPid The pid of the Gun connection process.
- StreamRef Identifier of the stream for the original request.
- Return value A map is returned containing various informations about the stream.</description>
+Description stream_info(ConnPid, StreamRef) -&amp;gt; {ok, undefined | Info} | {error, not_connected} ConnPid :: pid() StreamRef :: gun:stream_ref() Info :: #{ ref =&amp;gt; gun:stream_ref(), reply_to =&amp;gt; pid(), state =&amp;gt; running | stopping, intermediaries =&amp;gt; [Intermediary], tunnel =&amp;gt; Tunnel } Intermediary :: #{ type =&amp;gt; connect | socks5, host =&amp;gt; inet:hostname() | inet:ip_address(), port =&amp;gt; inet:port_number(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | raw } Tunnel :: #{ transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | raw, origin_scheme =&amp;gt; binary() | undefined, origin_host =&amp;gt; inet:hostname() | inet:ip_address(), origin_port =&amp;gt; inet:port_number() } Obtain information about a stream.</description>
</item>
<item>
@@ -10022,7 +10118,7 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.update_flow/</guid>
<description>Name gun:update_flow - Update a stream&amp;apos;s flow control value
-Description update_flow(ConnPid, StreamRef, Flow) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Flow :: pos_integer() Update a stream&amp;apos;s flow control value.
+Description update_flow(ConnPid, StreamRef, Flow) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Flow :: pos_integer() Update a stream&amp;apos;s flow control value.
The flow value can only ever be incremented.
This function does nothing for streams that have flow control disabled (which is the default).
Arguments ConnPid The pid of the Gun connection process.
@@ -10088,10 +10184,9 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.ws_send/</guid>
<description>Name gun:ws_send - Send Websocket frames
-Description ws_send(ConnPid, Frames) -&amp;gt; ok ConnPid :: pid() Frames :: Frame | [Frame] Frame :: close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, non_neg_integer(), iodata()} Send Websocket frames.
+Description ws_send(ConnPid, StreamRef, Frames) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Frames :: Frame | [Frame] Frame :: close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, non_neg_integer(), iodata()} Send Websocket frames.
The connection must first be upgraded to Websocket using the function gun:ws_upgrade(3).
-Arguments ConnPid The pid of the Gun connection process.
- Frames One or more Websocket frame(s).</description>
+Arguments ConnPid The pid of the Gun connection process.</description>
</item>
<item>
@@ -10149,7 +10244,7 @@ HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.ws_upgrade/</guid>
<description>Name gun:ws_upgrade - Upgrade to Websocket
-Description ws_upgrade(ConnPid, Path) -&amp;gt; ws_upgrade(ConnPid, Path, []) ws_upgrade(ConnPid, Path, Headers) -&amp;gt; StreamRef ws_upgrade(ConnPid, Path, Headers, WsOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() WsOpts :: gun:ws_opts StreamRef :: reference() Upgrade to Websocket.
+Description ws_upgrade(ConnPid, Path) -&amp;gt; ws_upgrade(ConnPid, Path, []) ws_upgrade(ConnPid, Path, Headers) -&amp;gt; StreamRef ws_upgrade(ConnPid, Path, Headers, WsOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() WsOpts :: gun:ws_opts StreamRef :: gun:stream_ref() Upgrade to Websocket.
The behavior of this function depends on the protocol selected.
HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if successful, will result in the complete takeover of the connection.</description>
</item>
@@ -10268,7 +10363,7 @@ The response body may be terminated either by a data message with the flag fin s
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_data/</guid>
<description>Name gun_data - Response body
-Description {gun_data, ConnPid, StreamRef, IsFin, Data} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: binary() Response body.
+Description {gun_data, ConnPid, StreamRef, IsFin, Data} ConnPid :: pid() StreamRef :: gun:stream_ref() IsFin :: fin | nofin Data :: binary() Response body.
This message informs the relevant process that the server sent a all or part of the body for the response to the original request.
A data message is always preceded by a response message.
The response body may be terminated either by a data message with the flag fin set or by a gun_trailers(3) message.</description>
@@ -10329,7 +10424,7 @@ When the connection goes back up, Gun will not attempt to retry requests.</descr
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_down/</guid>
<description>Name gun_down - The connection is down
-Description {gun_down, ConnPid, Protocol, Reason, KilledStreams} ConnPid :: pid() Protocol :: http | http2 | socks | ws Reason :: any() KilledStreams :: [reference()] The connection is down.
+Description {gun_down, ConnPid, Protocol, Reason, KilledStreams} ConnPid :: pid() Protocol :: http | http2 | socks | ws Reason :: any() KilledStreams :: [gun:stream_ref()] 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.</description>
</item>
@@ -10385,11 +10480,24 @@ These messages inform the relevant process that an error occurred. A reference i
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_error/</guid>
<description>Name gun_error - Stream or connection-wide error
-Description {gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: reference() Reason :: any() Stream or connection-wide error.
+Description {gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: gun:stream_ref() Reason :: any() Stream or connection-wide error.
These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.</description>
</item>
<item>
+ <title>gun_event(3)</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/manual/gun_event/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_event/</guid>
+ <description>Name gun_event - Events
+Description The gun_event module provides the callback interface and types for implementing event handlers.
+Callbacks Event handlers implement the following interface. Because types are tied to specific events, they are documented alongside them. All event types are exported and can be referred to as gun_event:Type().
+The events are ordered by the order they are likely to be triggered, with the most frequent events listed first.
+init init_event() :: #{ owner := pid(), transport := tcp | tls, origin_scheme := binary(), origin_host := inet:hostname() | inet:ip_address(), origin_port := inet:port_number(), opts := gun:opts() } init(init_event(), State) -&amp;gt; State Gun is initializing.</description>
+ </item>
+
+ <item>
<title>gun_inform(3)</title>
<link>https://ninenines.eu/docs/en/gun/1.0/manual/gun_inform/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -10444,7 +10552,7 @@ Informational responses are only intermediate responses and provide no guarantee
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_inform/</guid>
<description>Name gun_inform - Informational response
-Description {gun_inform, ConnPid, StreamRef, Status, Headers} ConnPid :: pid() StreamRef :: reference() Status :: 100..199 Headers :: [{binary(), binary()}] Informational response.
+Description {gun_inform, ConnPid, StreamRef, Status, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() Status :: 100..199 Headers :: [{binary(), binary()}] Informational response.
This message informs the relevant process that the server sent an informational response to the original request.
Informational responses are only intermediate responses and provide no guarantees as to what the final response will be. An informational response always precedes the response to the original request.</description>
</item>
@@ -10504,7 +10612,7 @@ A server-initiated push message always precedes the response to the original req
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_push/</guid>
<description>Name gun_push - Server-initiated push
-Description {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers} ConnPid :: pid() StreamRef :: reference() NewStreamRef :: reference() Method :: binary() URI :: binary() Headers :: [{binary(), binary()}] Server-initiated push.
+Description {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() NewStreamRef :: gun:stream_ref() Method :: binary() URI :: binary() Headers :: [{binary(), binary()}] Server-initiated push.
This message informs the relevant process that the server is pushing a resource related to the effective target URI of the original request.
A server-initiated push message always precedes the response to the original request.</description>
</item>
@@ -10572,7 +10680,7 @@ Elements ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_response/</guid>
<description>Name gun_response - Response
-Description {gun_response, ConnPid, StreamRef, IsFin, Status, Headers} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Status :: non_neg_integer() Headers :: [{binary(), binary()}] Response.
+Description {gun_response, ConnPid, StreamRef, IsFin, Status, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() IsFin :: fin | nofin Status :: non_neg_integer() Headers :: [{binary(), binary()}] Response.
This message informs the relevant process that the server sent a response to the original request.
Elements ConnPid The pid of the Gun connection process.
StreamRef Identifier of the stream for the original request.
@@ -10580,19 +10688,6 @@ Elements ConnPid The pid of the Gun connection process.
</item>
<item>
- <title>gun_socks_up(3)</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/manual/gun_socks_up/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_socks_up/</guid>
- <description>Name gun_socks_up - The Socks connection is up
-Description {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 gun_socks_up(3) messages will follow.
-Otherwise, Gun will start processing the messages it received while waiting for the connection to be up.</description>
- </item>
-
- <item>
<title>gun_trailers(3)</title>
<link>https://ninenines.eu/docs/en/gun/1.0/manual/gun_trailers/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -10659,7 +10754,7 @@ Elements ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_trailers/</guid>
<description>Name gun_trailers - Response trailers
-Description {gun_trailers, ConnPid, StreamRef, Headers} ConnPid :: pid() StreamRef :: reference() Headers :: [{binary(), binary()}] Response trailers.
+Description {gun_trailers, ConnPid, StreamRef, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() Headers :: [{binary(), binary()}] Response trailers.
This message informs the relevant process that the server sent response trailers for the response to the original request.
A trailers message terminates the response.
Elements ConnPid The pid of the Gun connection process.
@@ -10668,6 +10763,18 @@ Elements ConnPid The pid of the Gun connection process.
</item>
<item>
+ <title>gun_tunnel_up(3)</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/manual/gun_tunnel_up/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_tunnel_up/</guid>
+ <description>Name gun_tunnel_up - The tunnel is up
+Description {gun_tunnel_up, ConnPid, StreamRef, Protocol} ConnPid :: pid() StreamRef :: gun:stream_ref() | undefined Protocol :: http | http2 | socks The tunnel is up.
+This message informs the owner/calling process that the connection completed through the SOCKS or CONNECT proxy.
+If Gun is configured to connect to another SOCKS server, then the connection is not usable yet. One or more gun_tunnel_up(3) messages will follow.</description>
+ </item>
+
+ <item>
<title>gun_up(3)</title>
<link>https://ninenines.eu/docs/en/gun/1.0/manual/gun_up/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -10724,7 +10831,7 @@ Gun will now start processing the messages it received while waiting for the con
<description>Name gun_up - The connection is up
Description {gun_up, ConnPid, Protocol} ConnPid :: pid() Protocol :: http | http2 | socks The connection is up.
This message informs the owner process that the connection or reconnection completed.
-If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more gun_socks_up(3) messages will follow.
+If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more gun_tunnel_up(3) messages will follow.
Otherwise, Gun will start processing the messages it received while waiting for the connection to be up.</description>
</item>
@@ -10783,7 +10890,7 @@ The exact semantics of this message depend on the original protocol. HTTP/1.1 up
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_upgrade/</guid>
<description>Name gun_upgrade - Successful protocol upgrade
-Description {gun_upgrade, ConnPid, StreamRef, Protocols, Headers} ConnPid :: pid() StreamRef :: reference() Protocols :: [&amp;lt;&amp;lt;&#34;websocket&#34;&amp;gt;&amp;gt;] Headers :: [{binary(), binary()}] Successful protocol upgrade.
+Description {gun_upgrade, ConnPid, StreamRef, Protocols, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() Protocols :: [&amp;lt;&amp;lt;&#34;websocket&#34;&amp;gt;&amp;gt;] Headers :: [{binary(), binary()}] Successful protocol upgrade.
This message informs the relevant process that the server accepted to upgrade to one or more protocols given in the original request.
The exact semantics of this message depend on the original protocol. HTTP/1.1 upgrades apply to the entire connection. HTTP/2 uses a different mechanism which allows switching specific streams to a different protocol.</description>
</item>
@@ -10847,7 +10954,7 @@ Elements ConnPid The pid of the Gun connection process.</description>
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_ws/</guid>
<description>Name gun_ws - Websocket frame
-Description {gun_ws, ConnPid, StreamRef, Frame} ConnPid :: pid() StreamRef :: reference() Frame :: close | ping | pong | {text | binary | close, binary()} | {close, non_neg_integer(), binary()} | {ping | pong, binary()} Websocket frame.
+Description {gun_ws, ConnPid, StreamRef, Frame} ConnPid :: pid() StreamRef :: gun:stream_ref() Frame :: close | ping | pong | {text | binary | close, binary()} | {close, non_neg_integer(), binary()} | {ping | pong, binary()} Websocket frame.
This message informs the relevant process that the server sent the enclosed frame.
This message can only be sent on streams that were upgraded to the Websocket protocol.</description>
</item>
diff --git a/donate/index.html b/donate/index.html
index 45da96d5..2f841161 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -734,6 +734,8 @@
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
@@ -2263,6 +2265,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/erlanger-playbook/index.html b/erlanger-playbook/index.html
index f2f6bfce..f144f07c 100644
--- a/erlanger-playbook/index.html
+++ b/erlanger-playbook/index.html
@@ -774,6 +774,8 @@
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
@@ -2303,6 +2305,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/index.html b/index.html
index 4a6a409b..dfeec307 100644
--- a/index.html
+++ b/index.html
@@ -137,7 +137,7 @@
<a class="btn btn-large" href="https://github.com/ninenines/cowlib">Source Code</a>
- <a class="btn btn-large" href="/docs/en/cowlib/2.9/manual/">Manual</a>
+ <a class="btn btn-large" href="/docs/en/cowlib/2.10/manual/">Manual</a>
</p>
@@ -875,6 +875,8 @@
+
+
<p>Reward my work via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a> and<br/>GitHub will double the funds I receive!</p>
@@ -2388,6 +2390,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div></div>
</div>
diff --git a/index.xml b/index.xml
index 02378b8a..c371a8bb 100644
--- a/index.xml
+++ b/index.xml
@@ -83,7 +83,7 @@ Prerequisites Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocke
Supported platforms Gun is tested and supported on Linux, FreeBSD, Windows and OSX.
Gun is developed for Erlang/OTP 22.0 and newer.
License Gun uses the ISC License.
-Copyright (c) 2013-2019, Loïc Hoguin &amp;lt;[email protected]&amp;gt; Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.</description>
+Copyright (c) 2013-2020, Loïc Hoguin &amp;lt;[email protected]&amp;gt; Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.</description>
</item>
<item>
@@ -1048,6 +1048,16 @@ POTENTIAL SECURITY VULNERABILITY: Fix transfer-encoding precedence over content-
</item>
<item>
+ <title>Internals: TLS over TLS</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/</guid>
+ <description>The ssl application that comes with Erlang/OTP implements TLS using an interface equivalent to the gen_tcp interface: you get and manipulate a socket. The TLS encoding and decoding is applied transparently to the data sent and received.
+In order to have a TLS layer inside another TLS layer we need a way to encode the data of the inner layer before we pass it to the outer layer. We cannot do this with a socket interface.</description>
+ </item>
+
+ <item>
<title>Migrating from Gun 1.0 to 1.1</title>
<link>https://ninenines.eu/docs/en/gun/1.1/guide/migrating_from_1.0/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1068,17 +1078,6 @@ Features added CONNECT requests can now be issued on HTTP/1.1 connections. The t
</item>
<item>
- <title>Migrating from Gun 1.3 to 2.0</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</guid>
- <description>Gun 2.0 adds many features including graceful shutdown, flow control for data messages, event handlers, support for tunneling TLS connections through TLS proxies, Socks proxy support, and much more. It has only a limited number of breaking changes compared to the previous version.
-Gun 2.0 greatly improves the HTTP/2 performance when it comes to receiving large response bodies; and when receiving response bodies from many separate requests concurrently.
-Gun now shares much of its HTTP/2 code with Cowboy, including the HTTP/2 state machine.</description>
- </item>
-
- <item>
<title>Listeners</title>
<link>https://ninenines.eu/docs/en/cowboy/2.3/guide/listeners/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1337,13 +1336,13 @@ Features added The protocols CONNECT destination option has been added as a repl
</item>
<item>
- <title>Migrating from Gun 1.2 to 1.3</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</link>
+ <title>Migrating from Gun 1.3 to 2.0</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</guid>
- <description>Gun 1.3 improves the support for CONNECT requests introduced in the previous version and documents Websocket protocol negotiation.
-Features added The protocols CONNECT destination option has been added as a replacement for the now deprecated protocol option. Add built-in support for Websocket protocol negotiation through the Websocket option protocols. The interface of the handler module currently remains undocumented and must be set to gun_ws_h. Add the h2specd HTTP/2 test suite from the h2spec project.</description>
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</guid>
+ <description>Gun 2.0 includes state of the art tunnel support. With Gun 2.0 it is possible to make request or data go through any number of proxy endpoints using any combination of TCP or TLS transports and HTTP/1.1, HTTP/2 or SOCKS5 protocols. All combinations of the scenario Proxy1 -&amp;gt; Proxy2 -&amp;gt; Origin are tested and known to work.
+Gun 2.0 adds many more features such as Websocket over HTTP/2, a built-in cookie store, graceful shutdown, flow control for data messages, event handlers and more.</description>
</item>
<item>
@@ -1459,16 +1458,6 @@ Features added CONNECT requests can now be issued on HTTP/1.1 connections. The t
</item>
<item>
- <title>Migrating from Gun 1.1 to 1.2</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</guid>
- <description>Gun 1.2 adds support for the CONNECT request over HTTP/1.1 connections.
-Features added CONNECT requests can now be issued on HTTP/1.1 connections. The tunneled connection can use any of the protocols Gun supports: HTTP/1.1, HTTP/2 and Websocket over both TCP and TLS transports. Note that Gun currently does not support tunneling a TLS connection over a TLS connection due to limitations in Erlang/OTP. Gun supports sending multiple CONNECT requests, allowing the tunnel to the origin server to go through multiple proxies.</description>
- </item>
-
- <item>
<title>Handlers</title>
<link>https://ninenines.eu/docs/en/cowboy/2.3/guide/handlers/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1547,6 +1536,16 @@ init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No
</item>
<item>
+ <title>Migrating from Gun 1.2 to 1.3</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</guid>
+ <description>Gun 1.3 improves the support for CONNECT requests introduced in the previous version and documents Websocket protocol negotiation.
+Features added The protocols CONNECT destination option has been added as a replacement for the now deprecated protocol option. Add built-in support for Websocket protocol negotiation through the Websocket option protocols. The interface of the handler module currently remains undocumented and must be set to gun_ws_h. Add the h2specd HTTP/2 test suite from the h2spec project.</description>
+ </item>
+
+ <item>
<title>Migrating from Ranch 1.7 to Ranch 2.0</title>
<link>https://ninenines.eu/docs/en/ranch/2.0/guide/migrating_from_1.7/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1649,13 +1648,13 @@ Features added Update Cowlib to 2.5.1 Bugs fixed A bug in the experimental gun
</item>
<item>
- <title>Migrating from Gun 1.0 to 1.1</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</link>
+ <title>Migrating from Gun 1.1 to 1.2</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</guid>
- <description>Gun 1.1 updates the Cowlib dependency to 2.5.1 and fixes a few problems with experimental features.
-Features added Update Cowlib to 2.5.1 Bugs fixed A bug in the experimental gun_sse_h where lone id lines were not propagated has been fixed by updating the Cowlib dependency. The status code was incorrectly given to the experimental content handlers as a binary. It has been fixed an an integer is now given as was intended.</description>
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</guid>
+ <description>Gun 1.2 adds support for the CONNECT request over HTTP/1.1 connections.
+Features added CONNECT requests can now be issued on HTTP/1.1 connections. The tunneled connection can use any of the protocols Gun supports: HTTP/1.1, HTTP/2 and Websocket over both TCP and TLS transports. Note that Gun currently does not support tunneling a TLS connection over a TLS connection due to limitations in Erlang/OTP. Gun supports sending multiple CONNECT requests, allowing the tunnel to the origin server to go through multiple proxies.</description>
</item>
<item>
@@ -1758,6 +1757,16 @@ While a third-party library already existed, it was not entirely compatible with
</item>
<item>
+ <title>Migrating from Gun 1.0 to 1.1</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</guid>
+ <description>Gun 1.1 updates the Cowlib dependency to 2.5.1 and fixes a few problems with experimental features.
+Features added Update Cowlib to 2.5.1 Bugs fixed A bug in the experimental gun_sse_h where lone id lines were not propagated has been fixed by updating the Cowlib dependency. The status code was incorrectly given to the experimental content handlers as a binary. It has been fixed an an integer is now given as was intended.</description>
+ </item>
+
+ <item>
<title>The Req object</title>
<link>https://ninenines.eu/docs/en/cowboy/2.3/guide/req/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3785,6 +3794,17 @@ In Erlang though, you probably wouldn&amp;apos;t want an algorithm.</description
<item>
<title>cow_cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie/</guid>
+ <description>Name cow_cookie - Cookies
+Description The module cow_cookie provides functions for parsing and manipulating cookie headers.
+Exports cow_cookie:parse_cookie(3) - Parse a cookie header cow_cookie:parse_set_cookie(3) - Parse a set-cookie header cow_cookie:cookie(3) - Generate a cookie header cow_cookie:setcookie(3) - Generate a set-cookie header Types cookie_attrs() cookie_attrs() :: #{ expires =&amp;gt; calendar:datetime(), max_age =&amp;gt; calendar:datetime(), domain =&amp;gt; binary(), path =&amp;gt; binary(), secure =&amp;gt; true, http_only =&amp;gt; true, same_site =&amp;gt; strict | lax | none } Cookie attributes parsed from the set-cookie header.</description>
+ </item>
+
+ <item>
+ <title>cow_cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3807,6 +3827,19 @@ Exports cow_cookie:parse_cookie(3) - Parse a cookie header cow_cookie:parse_set
<item>
<title>cow_cookie:cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.cookie/</guid>
+ <description>Name cow_cookie:cookie - Generate a cookie header
+Description cookie(Cookies) -&amp;gt; iolist() Cookies :: [{Name :: iodata(), Value :: iodata()}] Generate a cookie header.
+Arguments Cookies A list of pairs of cookie name and value.
+ Return value An iolist with the generated cookie header value.
+Changelog 2.9: Function introduced. Examples Generate a cookie header Cookie = cow_cookie:cookie([{&amp;lt;&amp;lt;&#34;sessionid&#34;&amp;gt;&amp;gt;, ID}]). See also cow_cookie(3), cow_cookie:parse_cookie(3), cow_cookie:parse_set_cookie(3), cow_cookie:setcookie(3)</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.9/manual/cow_cookie.cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3820,6 +3853,20 @@ Changelog 2.9: Function introduced. Examples Generate a cookie header Cookie =
<item>
<title>cow_cookie:parse_cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/</guid>
+ <description>Name cow_cookie:parse_cookie - Parse a cookie header
+Description parse_cookie(Cookie :: binary()) -&amp;gt; [{binary(), binary()}] Parse a cookie header.
+Arguments Cookie The cookie header value.
+ Return value A list of cookie name/value pairs is returned on success.
+An exception is thrown in the event of a parse error.
+Changelog 2.9: Fixes to the parser may lead to potential incompatibilities. A cookie name starting with $ is no longer ignored.</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:parse_cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3848,6 +3895,19 @@ Changelog 2.9: Fixes to the parser may lead to potential incompatibilities. A co
<item>
<title>cow_cookie:parse_set_cookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/</guid>
+ <description>Name cow_cookie:parse_set_cookie - Parse a set-cookie header
+Description parse_set_cookie(SetCookie :: binary()) -&amp;gt; {ok, Name, Value, Attrs} | ignore Name :: binary() Value :: binary() Attrs :: cow_cookie:cookie_attrs() Parse a set-cookie header.
+Arguments SetCookie The set-cookie header value.
+ Return value An ok tuple with the cookie name, value and attributes is returned on success.
+An atom ignore is returned when the cookie has both an empty name and an empty value, and must be ignored.</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:parse_set_cookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -3861,6 +3921,21 @@ An atom ignore is returned when the cookie has both an empty name and an empty v
<item>
<title>cow_cookie:setcookie(3)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/</guid>
+ <description>Name cow_cookie:setcookie - Generate a set-cookie header
+Description setcookie(Name :: iodata(), Value :: iodata(), Opts :: cow_cookie:cookie_opts()) -&amp;gt; iolist() Generate a set-cookie header.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Opts Options added to the set-cookie header as attributes.
+ Return value An iolist with the generated set-cookie header value.
+Changelog 1.0: Function introduced. Examples Generate a set-cookie header SetCookie = cow_cookie:setcookie(&amp;lt;&amp;lt;&#34;sessionid&#34;&amp;gt;&amp;gt;, ID, #{ http_only =&amp;gt; true, secure =&amp;gt; true }).</description>
+ </item>
+
+ <item>
+ <title>cow_cookie:setcookie(3)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -9228,6 +9303,18 @@ init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, R
<item>
<title>Cowlib Function Reference</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/</guid>
+ <description>Name cowlib - Support library for manipulating Web protocols
+Description Cowlib provides libraries for parsing and building messages for various Web protocols, including HTTP/1.1, HTTP/2 and Websocket.
+It is optimized for completeness rather than speed. No value is ignored, they are all returned.
+Modules cow_cookie(3) - Cookies Dependencies crypto - Crypto functions All these applications must be started before the cowlib application. To start Cowlib and all dependencies at once:</description>
+ </item>
+
+ <item>
+ <title>Cowlib Function Reference</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -9252,6 +9339,18 @@ Modules cow_cookie(3) - Cookies Dependencies crypto - Crypto functions All t
<item>
<title>cowlib(7)</title>
+ <link>https://ninenines.eu/docs/en/cowlib/2.10/manual/cowlib_app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowlib/2.10/manual/cowlib_app/</guid>
+ <description>Name cowlib - Support library for manipulating Web protocols
+Description Cowlib provides libraries for parsing and building messages for various Web protocols, including HTTP/1.1, HTTP/2 and Websocket.
+It is optimized for completeness rather than speed. No value is ignored, they are all returned.
+Modules cow_cookie(3) - Cookies Dependencies crypto - Crypto functions All these applications must be started before the cowlib application. To start Cowlib and all dependencies at once:</description>
+ </item>
+
+ <item>
+ <title>cowlib(7)</title>
<link>https://ninenines.eu/docs/en/cowlib/2.8/manual/cowlib_app/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -9331,7 +9430,7 @@ Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support lib
<description>Name gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP
Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
-Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
+Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection gun_event(3) - Events Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
</item>
<item>
@@ -9376,7 +9475,7 @@ Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/gun/2.0/guide/</guid>
- <description>Interface Introduction Starting and stopping Supported protocols Connection Using HTTP Using Websocket Additional information Migrating from Gun 1.3 to 2.0 Migrating from Gun 1.2 to 1.3 Migrating from Gun 1.1 to 1.2 Migrating from Gun 1.0 to 1.1 </description>
+ <description>Interface Introduction Starting and stopping Supported protocols Connection Using HTTP Using Websocket Advanced Internals: TLS over TLS Additional information Migrating from Gun 1.3 to 2.0 Migrating from Gun 1.2 to 1.3 Migrating from Gun 1.1 to 1.2 Migrating from Gun 1.0 to 1.1 </description>
</item>
<item>
@@ -9496,7 +9595,7 @@ Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support lib
<description>Name gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP
Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
-Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
+Modules gun(3) - Asynchronous HTTP client gun_cookies(3) - Cookie store engine gun_cookies_list(3) - Cookie store backend: in-memory, per connection gun_event(3) - Events Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
</item>
<item>
@@ -9550,7 +9649,7 @@ This function waits for a message from the given stream and returns it as a tupl
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.await/</guid>
<description>Name gun:await - Wait for a response
-Description await(ConnPid, StreamRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, MonitorRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, Timeout) -&amp;gt; await(ConnPid, StreamRef, Timeout, MonitorRef) await(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; Result ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Result :: tuple() - see below Wait for a response.
+Description await(ConnPid, StreamRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, MonitorRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, Timeout) -&amp;gt; await(ConnPid, StreamRef, Timeout, MonitorRef) await(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; Result ConnPid :: pid() StreamRef :: gun:stream_ref() MonitorRef :: reference() Timeout :: timeout() Result :: tuple() - see below Wait for a response.
This function waits for a message from the given stream and returns it as a tuple.</description>
</item>
@@ -9601,7 +9700,7 @@ Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamR
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.await_body/</guid>
<description>Name gun:await_body - Wait for the complete response body
-Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, MonitorRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, Timeout) -&amp;gt; await_body(ConnPid, StreamRef, Timeout, MonitorRef) await_body(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; {ok, Body} | {ok, Body, Trailers} | {error, Reason} ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Body :: binary() Trailers :: [{binary(), binary()}] Reason :: {stream_error | connection_error | down, any()} | timeout Wait for the complete response body.</description>
+Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, MonitorRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, Timeout) -&amp;gt; await_body(ConnPid, StreamRef, Timeout, MonitorRef) await_body(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; {ok, Body} | {ok, Body, Trailers} | {error, Reason} ConnPid :: pid() StreamRef :: gun:stream_ref() MonitorRef :: reference() Timeout :: timeout() Body :: binary() Trailers :: [{binary(), binary()}] Reason :: {stream_error | connection_error | down, any()} | timeout Wait for the complete response body.</description>
</item>
<item>
@@ -9714,7 +9813,7 @@ HTTP/1.1 does not support this feature. Gun will simply silence the stream and s
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.cancel/</guid>
<description>Name gun:cancel - Cancel the given stream
-Description cancel(ConnPid, StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Cancel the given stream.
+Description cancel(ConnPid, StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Cancel the given stream.
The behavior of this function depends on the protocol selected.
HTTP/1.1 does not support this feature. Gun will simply silence the stream and stop relaying messages. Gun may also decide to close the connection if the response body is too large, to avoid wasting time and bandwidth.</description>
</item>
@@ -9813,7 +9912,7 @@ This feature is currently only available for HTTP/1.1 connections. Upon successf
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.connect/</guid>
<description>Name gun:connect - Establish a tunnel to the origin server
-Description connect(ConnPid, Destination) -&amp;gt; connect(ConnPid, Destination, [], #{}). connect(ConnPid, Destination, Headers) -&amp;gt; connect(ConnPid, Destination, Headers, #{}). connect(ConnPid, Destination, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Destination :: gun:connect_destination() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Establish a tunnel to the origin server.
+Description connect(ConnPid, Destination) -&amp;gt; connect(ConnPid, Destination, [], #{}). connect(ConnPid, Destination, Headers) -&amp;gt; connect(ConnPid, Destination, Headers, #{}). connect(ConnPid, Destination, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Destination :: gun:connect_destination() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Establish a tunnel to the origin server.
This feature is currently only available for HTTP/1.1 connections. Upon successful completion of the CONNECT request a tunnel is established and subsequent requests will go through the tunnel.</description>
</item>
@@ -9872,7 +9971,7 @@ All calls to this function must use the nofin flag except for the last which mus
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.data/</guid>
<description>Name gun:data - Stream the body of a request
-Description data(ConnPid, StreamRef, IsFin, Data) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: iodata() Stream the body of a request.
+Description data(ConnPid, StreamRef, IsFin, Data) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() IsFin :: fin | nofin Data :: iodata() Stream the body of a request.
This function can only be used if the original request had headers indicating that a body would be streamed.
All calls to this function must use the nofin flag except for the last which must use fin to indicate the end of the request body.</description>
</item>
@@ -9940,7 +10039,7 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.delete/</guid>
<description>Name gun:delete - Delete a resource
-Description delete(ConnPid, Path) -&amp;gt; delete(ConnPid, Path, [], #{}). delete(ConnPid, Path, Headers) -&amp;gt; delete(ConnPid, Path, Headers, #{}) delete(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Delete a resource.
+Description delete(ConnPid, Path) -&amp;gt; delete(ConnPid, Path, [], #{}). delete(ConnPid, Path, Headers) -&amp;gt; delete(ConnPid, Path, Headers, #{}) delete(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Delete a resource.
Arguments ConnPid The pid of the Gun connection process.
Path Path to the resource.
Headers Additional request headers.
@@ -10010,7 +10109,7 @@ ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.flush/</guid>
<description>Name gun:flush - Flush all messages related to a connection or a stream
-Description flush(ConnPid) -&amp;gt; ok flush(StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Flush all messages related to a connection or a stream.
+Description flush(ConnPid) -&amp;gt; ok flush(StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Flush all messages related to a connection or a stream.
Arguments Either of these arguments may be provided:
ConnPid The pid of the Gun connection process.
StreamRef Identifier of the stream for the original request.
@@ -10076,7 +10175,7 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.get/</guid>
<description>Name gun:get - Get a resource representation
-Description get(ConnPid, Path) -&amp;gt; get(ConnPid, Path, [], #{}). get(ConnPid, Path, Headers) -&amp;gt; get(ConnPid, Path, Headers, #{}) get(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Get a resource representation.
+Description get(ConnPid, Path) -&amp;gt; get(ConnPid, Path, [], #{}). get(ConnPid, Path, Headers) -&amp;gt; get(ConnPid, Path, Headers, #{}) get(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Get a resource representation.
Arguments ConnPid The pid of the Gun connection process.
Path Path to the resource.
Headers Additional request headers.
@@ -10134,7 +10233,7 @@ This function performs the same operation as gun:get(3), except the server will
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.head/</guid>
<description>Name gun:head - Get headers of a resource representation
-Description head(ConnPid, Path) -&amp;gt; head(ConnPid, Path, [], #{}). head(ConnPid, Path, Headers) -&amp;gt; head(ConnPid, Path, Headers, #{}) head(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Get headers of a resource representation.
+Description head(ConnPid, Path) -&amp;gt; head(ConnPid, Path, [], #{}). head(ConnPid, Path, Headers) -&amp;gt; head(ConnPid, Path, Headers, #{}) head(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Get headers of a resource representation.
This function performs the same operation as gun:get(3), except the server will not send the resource representation, only the response&amp;apos;s status code and headers.</description>
</item>
@@ -10145,7 +10244,7 @@ This function performs the same operation as gun:get(3), except the server will
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.headers/</guid>
<description>Name gun:headers - Initiate the given request
-Description headers(ConnPid, Method, Path, Headers) -&amp;gt; headers(ConnPid, Method, Path, Headers, #{}) headers(ConnPid, Method, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Initiate the given request.
+Description headers(ConnPid, Method, Path, Headers) -&amp;gt; headers(ConnPid, Method, Path, Headers, #{}) headers(ConnPid, Method, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Initiate the given request.
This is a general purpose function that should only be used when other method-specific functions do not apply.
The function headers/4,5 initiates a request but does not send the request body.</description>
</item>
@@ -10206,7 +10305,7 @@ Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ socket =&am
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.info/</guid>
<description>Name gun:info - Obtain information about the connection
-Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ owner =&amp;gt; pid(), socket =&amp;gt; inet:socket() | ssl:sslsocket(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | ws, sock_ip =&amp;gt; inet:ip_address(), sock_port =&amp;gt; inet:port_number(), origin_host =&amp;gt; inet:hostname() | inet:ip_address(), origin_port =&amp;gt; inet:port_number(), intermediaries =&amp;gt; [Intermediary], cookie_store =&amp;gt; gun_cookies:cookie_store() } Intermediary :: #{ type =&amp;gt; connect | socks5, host =&amp;gt; inet:hostname() | inet:ip_address(), port =&amp;gt; inet:port_number(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks } Obtain information about the connection.</description>
+Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ owner =&amp;gt; pid(), socket =&amp;gt; inet:socket() | ssl:sslsocket(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | ws, sock_ip =&amp;gt; inet:ip_address(), sock_port =&amp;gt; inet:port_number(), origin_scheme =&amp;gt; binary() | undefined, origin_host =&amp;gt; inet:hostname() | inet:ip_address(), origin_port =&amp;gt; inet:port_number(), intermediaries =&amp;gt; [Intermediary], cookie_store =&amp;gt; gun_cookies:cookie_store() } Intermediary :: #{ type =&amp;gt; connect | socks5, host =&amp;gt; inet:hostname() | inet:ip_address(), port =&amp;gt; inet:port_number(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | raw } Obtain information about the connection.</description>
</item>
<item>
@@ -10387,7 +10486,7 @@ The special path &amp;quot;*&amp;quot; can be used to obtain information about t
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.options/</guid>
<description>Name gun:options - Query the capabilities of the server or a resource
-Description options(ConnPid, Path) -&amp;gt; options(ConnPid, Path, [], #{}). options(ConnPid, Path, Headers) -&amp;gt; options(ConnPid, Path, Headers, #{}) options(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: reference() Query the capabilities of the server or a resource.
+Description options(ConnPid, Path) -&amp;gt; options(ConnPid, Path, [], #{}). options(ConnPid, Path, Headers) -&amp;gt; options(ConnPid, Path, Headers, #{}) options(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Query the capabilities of the server or a resource.
The special path &amp;quot;*&amp;quot; can be used to obtain information about the server as a whole.</description>
</item>
@@ -10442,7 +10541,7 @@ The behavior of this function varies depending on whether a body is provided.</d
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.patch/</guid>
<description>Name gun:patch - Apply a set of changes to a resource
-Description patch(ConnPid, Path, Headers) -&amp;gt; patch(ConnPid, Path, Headers, #{}) patch(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef patch(ConnPid, Path, Headers, Body) -&amp;gt; patch(ConnPid, Path, Headers, Body, #{}) patch(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Apply a set of changes to a resource.</description>
+Description patch(ConnPid, Path, Headers) -&amp;gt; patch(ConnPid, Path, Headers, #{}) patch(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef patch(ConnPid, Path, Headers, Body) -&amp;gt; patch(ConnPid, Path, Headers, Body, #{}) patch(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Apply a set of changes to a resource.</description>
</item>
<item>
@@ -10496,7 +10595,7 @@ The behavior of this function varies depending on whether a body is provided.</d
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.post/</guid>
<description>Name gun:post - Process the enclosed representation according to a resource&amp;apos;s own semantics
-Description post(ConnPid, Path, Headers) -&amp;gt; post(ConnPid, Path, Headers, #{}) post(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef post(ConnPid, Path, Headers, Body) -&amp;gt; post(ConnPid, Path, Headers, Body, #{}) post(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Process the enclosed representation according to a resource&amp;apos;s own semantics.</description>
+Description post(ConnPid, Path, Headers) -&amp;gt; post(ConnPid, Path, Headers, #{}) post(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef post(ConnPid, Path, Headers, Body) -&amp;gt; post(ConnPid, Path, Headers, Body, #{}) post(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Process the enclosed representation according to a resource&amp;apos;s own semantics.</description>
</item>
<item>
@@ -10554,7 +10653,7 @@ The function put/3 expects either a content-length or content-type header to ind
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.put/</guid>
<description>Name gun:put - Create or replace a resource
-Description put(ConnPid, Path, Headers) -&amp;gt; put(ConnPid, Path, Headers, #{}) put(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef put(ConnPid, Path, Headers, Body) -&amp;gt; put(ConnPid, Path, Headers, Body, #{}) put(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Create or replace a resource.
+Description put(ConnPid, Path, Headers) -&amp;gt; put(ConnPid, Path, Headers, #{}) put(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef put(ConnPid, Path, Headers, Body) -&amp;gt; put(ConnPid, Path, Headers, Body, #{}) put(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Create or replace a resource.
The behavior of this function varies depending on whether a body is provided.</description>
</item>
@@ -10609,7 +10708,7 @@ This is a general purpose function that should only be used when other method-sp
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.request/</guid>
<description>Name gun:request - Perform the given request
-Description request(ConnPid, Method, Path, Headers, Body) -&amp;gt; request(ConnPid, Method, Path, Headers, Body, #{}) request(ConnPid, Method, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Perform the given request.
+Description request(ConnPid, Method, Path, Headers, Body) -&amp;gt; request(ConnPid, Method, Path, Headers, Body, #{}) request(ConnPid, Method, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: gun:req_headers() Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: gun:stream_ref() Perform the given request.
This is a general purpose function that should only be used when other method-specific functions do not apply.</description>
</item>
@@ -10646,10 +10745,7 @@ For HTTP/1.1 there is no such mechanism and Gun will close the connection once t
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.stream_info/</guid>
<description>Name gun:stream_info - Obtain information about a stream
-Description stream_info(ConnPid, StreamRef) -&amp;gt; {ok, undefined | Info} | {error, not_connected} ConnPid :: pid() StreamRef :: reference() Info :: #{ ref =&amp;gt; reference(), reply_to =&amp;gt; pid(), state =&amp;gt; running | stopping } Obtain information about a stream.
-Arguments ConnPid The pid of the Gun connection process.
- StreamRef Identifier of the stream for the original request.
- Return value A map is returned containing various informations about the stream.</description>
+Description stream_info(ConnPid, StreamRef) -&amp;gt; {ok, undefined | Info} | {error, not_connected} ConnPid :: pid() StreamRef :: gun:stream_ref() Info :: #{ ref =&amp;gt; gun:stream_ref(), reply_to =&amp;gt; pid(), state =&amp;gt; running | stopping, intermediaries =&amp;gt; [Intermediary], tunnel =&amp;gt; Tunnel } Intermediary :: #{ type =&amp;gt; connect | socks5, host =&amp;gt; inet:hostname() | inet:ip_address(), port =&amp;gt; inet:port_number(), transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | raw } Tunnel :: #{ transport =&amp;gt; tcp | tls, protocol =&amp;gt; http | http2 | socks | raw, origin_scheme =&amp;gt; binary() | undefined, origin_host =&amp;gt; inet:hostname() | inet:ip_address(), origin_port =&amp;gt; inet:port_number() } Obtain information about a stream.</description>
</item>
<item>
@@ -10659,7 +10755,7 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.update_flow/</guid>
<description>Name gun:update_flow - Update a stream&amp;apos;s flow control value
-Description update_flow(ConnPid, StreamRef, Flow) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Flow :: pos_integer() Update a stream&amp;apos;s flow control value.
+Description update_flow(ConnPid, StreamRef, Flow) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Flow :: pos_integer() Update a stream&amp;apos;s flow control value.
The flow value can only ever be incremented.
This function does nothing for streams that have flow control disabled (which is the default).
Arguments ConnPid The pid of the Gun connection process.
@@ -10725,10 +10821,9 @@ Arguments ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.ws_send/</guid>
<description>Name gun:ws_send - Send Websocket frames
-Description ws_send(ConnPid, Frames) -&amp;gt; ok ConnPid :: pid() Frames :: Frame | [Frame] Frame :: close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, non_neg_integer(), iodata()} Send Websocket frames.
+Description ws_send(ConnPid, StreamRef, Frames) -&amp;gt; ok ConnPid :: pid() StreamRef :: gun:stream_ref() Frames :: Frame | [Frame] Frame :: close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, non_neg_integer(), iodata()} Send Websocket frames.
The connection must first be upgraded to Websocket using the function gun:ws_upgrade(3).
-Arguments ConnPid The pid of the Gun connection process.
- Frames One or more Websocket frame(s).</description>
+Arguments ConnPid The pid of the Gun connection process.</description>
</item>
<item>
@@ -10786,7 +10881,7 @@ HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun.ws_upgrade/</guid>
<description>Name gun:ws_upgrade - Upgrade to Websocket
-Description ws_upgrade(ConnPid, Path) -&amp;gt; ws_upgrade(ConnPid, Path, []) ws_upgrade(ConnPid, Path, Headers) -&amp;gt; StreamRef ws_upgrade(ConnPid, Path, Headers, WsOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() WsOpts :: gun:ws_opts StreamRef :: reference() Upgrade to Websocket.
+Description ws_upgrade(ConnPid, Path) -&amp;gt; ws_upgrade(ConnPid, Path, []) ws_upgrade(ConnPid, Path, Headers) -&amp;gt; StreamRef ws_upgrade(ConnPid, Path, Headers, WsOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: gun:req_headers() WsOpts :: gun:ws_opts StreamRef :: gun:stream_ref() Upgrade to Websocket.
The behavior of this function depends on the protocol selected.
HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if successful, will result in the complete takeover of the connection.</description>
</item>
@@ -10905,7 +11000,7 @@ The response body may be terminated either by a data message with the flag fin s
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_data/</guid>
<description>Name gun_data - Response body
-Description {gun_data, ConnPid, StreamRef, IsFin, Data} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: binary() Response body.
+Description {gun_data, ConnPid, StreamRef, IsFin, Data} ConnPid :: pid() StreamRef :: gun:stream_ref() IsFin :: fin | nofin Data :: binary() Response body.
This message informs the relevant process that the server sent a all or part of the body for the response to the original request.
A data message is always preceded by a response message.
The response body may be terminated either by a data message with the flag fin set or by a gun_trailers(3) message.</description>
@@ -10966,7 +11061,7 @@ When the connection goes back up, Gun will not attempt to retry requests.</descr
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_down/</guid>
<description>Name gun_down - The connection is down
-Description {gun_down, ConnPid, Protocol, Reason, KilledStreams} ConnPid :: pid() Protocol :: http | http2 | socks | ws Reason :: any() KilledStreams :: [reference()] The connection is down.
+Description {gun_down, ConnPid, Protocol, Reason, KilledStreams} ConnPid :: pid() Protocol :: http | http2 | socks | ws Reason :: any() KilledStreams :: [gun:stream_ref()] 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.</description>
</item>
@@ -11022,11 +11117,24 @@ These messages inform the relevant process that an error occurred. A reference i
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_error/</guid>
<description>Name gun_error - Stream or connection-wide error
-Description {gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: reference() Reason :: any() Stream or connection-wide error.
+Description {gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: gun:stream_ref() Reason :: any() Stream or connection-wide error.
These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.</description>
</item>
<item>
+ <title>gun_event(3)</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/manual/gun_event/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_event/</guid>
+ <description>Name gun_event - Events
+Description The gun_event module provides the callback interface and types for implementing event handlers.
+Callbacks Event handlers implement the following interface. Because types are tied to specific events, they are documented alongside them. All event types are exported and can be referred to as gun_event:Type().
+The events are ordered by the order they are likely to be triggered, with the most frequent events listed first.
+init init_event() :: #{ owner := pid(), transport := tcp | tls, origin_scheme := binary(), origin_host := inet:hostname() | inet:ip_address(), origin_port := inet:port_number(), opts := gun:opts() } init(init_event(), State) -&amp;gt; State Gun is initializing.</description>
+ </item>
+
+ <item>
<title>gun_inform(3)</title>
<link>https://ninenines.eu/docs/en/gun/1.0/manual/gun_inform/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -11081,7 +11189,7 @@ Informational responses are only intermediate responses and provide no guarantee
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_inform/</guid>
<description>Name gun_inform - Informational response
-Description {gun_inform, ConnPid, StreamRef, Status, Headers} ConnPid :: pid() StreamRef :: reference() Status :: 100..199 Headers :: [{binary(), binary()}] Informational response.
+Description {gun_inform, ConnPid, StreamRef, Status, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() Status :: 100..199 Headers :: [{binary(), binary()}] Informational response.
This message informs the relevant process that the server sent an informational response to the original request.
Informational responses are only intermediate responses and provide no guarantees as to what the final response will be. An informational response always precedes the response to the original request.</description>
</item>
@@ -11141,7 +11249,7 @@ A server-initiated push message always precedes the response to the original req
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_push/</guid>
<description>Name gun_push - Server-initiated push
-Description {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers} ConnPid :: pid() StreamRef :: reference() NewStreamRef :: reference() Method :: binary() URI :: binary() Headers :: [{binary(), binary()}] Server-initiated push.
+Description {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() NewStreamRef :: gun:stream_ref() Method :: binary() URI :: binary() Headers :: [{binary(), binary()}] Server-initiated push.
This message informs the relevant process that the server is pushing a resource related to the effective target URI of the original request.
A server-initiated push message always precedes the response to the original request.</description>
</item>
@@ -11209,7 +11317,7 @@ Elements ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_response/</guid>
<description>Name gun_response - Response
-Description {gun_response, ConnPid, StreamRef, IsFin, Status, Headers} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Status :: non_neg_integer() Headers :: [{binary(), binary()}] Response.
+Description {gun_response, ConnPid, StreamRef, IsFin, Status, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() IsFin :: fin | nofin Status :: non_neg_integer() Headers :: [{binary(), binary()}] Response.
This message informs the relevant process that the server sent a response to the original request.
Elements ConnPid The pid of the Gun connection process.
StreamRef Identifier of the stream for the original request.
@@ -11217,19 +11325,6 @@ Elements ConnPid The pid of the Gun connection process.
</item>
<item>
- <title>gun_socks_up(3)</title>
- <link>https://ninenines.eu/docs/en/gun/2.0/manual/gun_socks_up/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_socks_up/</guid>
- <description>Name gun_socks_up - The Socks connection is up
-Description {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 gun_socks_up(3) messages will follow.
-Otherwise, Gun will start processing the messages it received while waiting for the connection to be up.</description>
- </item>
-
- <item>
<title>gun_trailers(3)</title>
<link>https://ninenines.eu/docs/en/gun/1.0/manual/gun_trailers/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -11296,7 +11391,7 @@ Elements ConnPid The pid of the Gun connection process.
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_trailers/</guid>
<description>Name gun_trailers - Response trailers
-Description {gun_trailers, ConnPid, StreamRef, Headers} ConnPid :: pid() StreamRef :: reference() Headers :: [{binary(), binary()}] Response trailers.
+Description {gun_trailers, ConnPid, StreamRef, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() Headers :: [{binary(), binary()}] Response trailers.
This message informs the relevant process that the server sent response trailers for the response to the original request.
A trailers message terminates the response.
Elements ConnPid The pid of the Gun connection process.
@@ -11305,6 +11400,18 @@ Elements ConnPid The pid of the Gun connection process.
</item>
<item>
+ <title>gun_tunnel_up(3)</title>
+ <link>https://ninenines.eu/docs/en/gun/2.0/manual/gun_tunnel_up/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_tunnel_up/</guid>
+ <description>Name gun_tunnel_up - The tunnel is up
+Description {gun_tunnel_up, ConnPid, StreamRef, Protocol} ConnPid :: pid() StreamRef :: gun:stream_ref() | undefined Protocol :: http | http2 | socks The tunnel is up.
+This message informs the owner/calling process that the connection completed through the SOCKS or CONNECT proxy.
+If Gun is configured to connect to another SOCKS server, then the connection is not usable yet. One or more gun_tunnel_up(3) messages will follow.</description>
+ </item>
+
+ <item>
<title>gun_up(3)</title>
<link>https://ninenines.eu/docs/en/gun/1.0/manual/gun_up/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -11361,7 +11468,7 @@ Gun will now start processing the messages it received while waiting for the con
<description>Name gun_up - The connection is up
Description {gun_up, ConnPid, Protocol} ConnPid :: pid() Protocol :: http | http2 | socks The connection is up.
This message informs the owner process that the connection or reconnection completed.
-If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more gun_socks_up(3) messages will follow.
+If Gun is configured to connect to a Socks server, then the connection is not usable yet. One or more gun_tunnel_up(3) messages will follow.
Otherwise, Gun will start processing the messages it received while waiting for the connection to be up.</description>
</item>
@@ -11420,7 +11527,7 @@ The exact semantics of this message depend on the original protocol. HTTP/1.1 up
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_upgrade/</guid>
<description>Name gun_upgrade - Successful protocol upgrade
-Description {gun_upgrade, ConnPid, StreamRef, Protocols, Headers} ConnPid :: pid() StreamRef :: reference() Protocols :: [&amp;lt;&amp;lt;&#34;websocket&#34;&amp;gt;&amp;gt;] Headers :: [{binary(), binary()}] Successful protocol upgrade.
+Description {gun_upgrade, ConnPid, StreamRef, Protocols, Headers} ConnPid :: pid() StreamRef :: gun:stream_ref() Protocols :: [&amp;lt;&amp;lt;&#34;websocket&#34;&amp;gt;&amp;gt;] Headers :: [{binary(), binary()}] Successful protocol upgrade.
This message informs the relevant process that the server accepted to upgrade to one or more protocols given in the original request.
The exact semantics of this message depend on the original protocol. HTTP/1.1 upgrades apply to the entire connection. HTTP/2 uses a different mechanism which allows switching specific streams to a different protocol.</description>
</item>
@@ -11484,7 +11591,7 @@ Elements ConnPid The pid of the Gun connection process.</description>
<guid>https://ninenines.eu/docs/en/gun/2.0/manual/gun_ws/</guid>
<description>Name gun_ws - Websocket frame
-Description {gun_ws, ConnPid, StreamRef, Frame} ConnPid :: pid() StreamRef :: reference() Frame :: close | ping | pong | {text | binary | close, binary()} | {close, non_neg_integer(), binary()} | {ping | pong, binary()} Websocket frame.
+Description {gun_ws, ConnPid, StreamRef, Frame} ConnPid :: pid() StreamRef :: gun:stream_ref() Frame :: close | ping | pong | {text | binary | close, binary()} | {close, non_neg_integer(), binary()} | {ping | pong, binary()} Websocket frame.
This message informs the relevant process that the server sent the enclosed frame.
This message can only be sent on streams that were upgraded to the Websocket protocol.</description>
</item>
diff --git a/services/index.html b/services/index.html
index cea946e4..1def33f2 100644
--- a/services/index.html
+++ b/services/index.html
@@ -760,6 +760,8 @@
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
@@ -2289,6 +2291,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/sitemap.xml b/sitemap.xml
index 4b1d713d..f1c54457 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -367,15 +367,15 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/1.1/guide/migrating_from_1.0/</loc>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/guide/internals_tls_over_tls/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/1.2/guide/migrating_from_1.1/</loc>
+ <loc>https://ninenines.eu/docs/en/gun/1.1/guide/migrating_from_1.0/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</loc>
+ <loc>https://ninenines.eu/docs/en/gun/1.2/guide/migrating_from_1.1/</loc>
</url>
<url>
@@ -475,7 +475,7 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</loc>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.3/</loc>
</url>
<url>
@@ -519,10 +519,6 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</loc>
- </url>
-
- <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.3/guide/handlers/</loc>
</url>
@@ -547,6 +543,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.2/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/2.0/guide/migrating_from_1.7/</loc>
</url>
@@ -587,7 +587,7 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</loc>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.1/</loc>
</url>
<url>
@@ -627,6 +627,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/guide/migrating_from_1.0/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.3/guide/req/</loc>
</url>
@@ -1446,6 +1450,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie/</loc>
</url>
@@ -1454,10 +1462,18 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.cookie/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.9/manual/cow_cookie.cookie/</loc>
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_cookie/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie.parse_cookie/</loc>
</url>
@@ -1466,10 +1482,18 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.parse_set_cookie/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.9/manual/cow_cookie.parse_set_cookie/</loc>
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/cow_cookie.setcookie/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.8/manual/cow_cookie.setcookie/</loc>
</url>
@@ -3174,6 +3198,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.8/manual/</loc>
</url>
@@ -3182,6 +3210,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowlib/2.10/manual/cowlib_app/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowlib/2.8/manual/cowlib_app/</loc>
</url>
@@ -3782,6 +3814,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/manual/gun_event/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/gun/1.0/manual/gun_inform/</loc>
</url>
@@ -3842,10 +3878,6 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/gun/2.0/manual/gun_socks_up/</loc>
- </url>
-
- <url>
<loc>https://ninenines.eu/docs/en/gun/1.0/manual/gun_trailers/</loc>
</url>
@@ -3866,6 +3898,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/gun/2.0/manual/gun_tunnel_up/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/gun/1.0/manual/gun_up/</loc>
</url>