summaryrefslogtreecommitdiffstats
path: root/docs/index.xml
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-10-01 00:08:31 +0200
committerLoïc Hoguin <[email protected]>2016-10-01 00:08:31 +0200
commit83f1ad46e84c1a9016c9dee2c1ec749880dfd260 (patch)
tree255dee9f634e4e4395cc48ece6b307f131da30d2 /docs/index.xml
parent348cfe494318d0c12072fd75ff451c3b40168965 (diff)
downloadninenines.eu-83f1ad46e84c1a9016c9dee2c1ec749880dfd260.tar.gz
ninenines.eu-83f1ad46e84c1a9016c9dee2c1ec749880dfd260.tar.bz2
ninenines.eu-83f1ad46e84c1a9016c9dee2c1ec749880dfd260.zip
HTTPS fixes and link:man support in docs + doc update
Diffstat (limited to 'docs/index.xml')
-rw-r--r--docs/index.xml1264
1 files changed, 644 insertions, 620 deletions
diff --git a/docs/index.xml b/docs/index.xml
index d301fc08..6ec370a3 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -2,18 +2,18 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Docs on Nine Nines</title>
- <link>http://ninenines.eu/docs/</link>
+ <link>https://ninenines.eu/docs/</link>
<description>Recent content in Docs on Nine Nines</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
- <atom:link href="http://ninenines.eu/docs/index.xml" rel="self" type="application/rss+xml" />
+ <atom:link href="https://ninenines.eu/docs/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Cowboy Function Reference</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/</link>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/</guid>
<description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
@@ -62,11 +62,31 @@
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
+&lt;a href=&#34;cowboy.set_env&#34;&gt;cowboy:set_env(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
&lt;a href=&#34;cowboy_static&#34;&gt;cowboy_static(3)&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
+&lt;a href=&#34;cowboy.stop_listener&#34;&gt;cowboy:stop_listener(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
&lt;a href=&#34;cowboy_sub_protocol&#34;&gt;cowboy_sub_protocol(3)&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
@@ -86,10 +106,10 @@
<item>
<title>Cowboy User Guide</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/</link>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/guide/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_rationale&#34;&gt;Rationale&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
@@ -297,10 +317,10 @@
<item>
<title>Erlang.mk User Guide</title>
- <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/</link>
+ <link>https://ninenines.eu/docs/en/erlang.mk/1/guide/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/</guid>
+ <guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/</guid>
<description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
@@ -468,10 +488,10 @@
<item>
<title>Gun Function Reference</title>
- <link>http://ninenines.eu/docs/en/gun/1.0/manual/</link>
+ <link>https://ninenines.eu/docs/en/gun/1.0/manual/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/gun/1.0/manual/</guid>
+ <guid>https://ninenines.eu/docs/en/gun/1.0/manual/</guid>
<description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
@@ -489,10 +509,10 @@
<item>
<title>Gun User Guide</title>
- <link>http://ninenines.eu/docs/en/gun/1.0/guide/</link>
+ <link>https://ninenines.eu/docs/en/gun/1.0/guide/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/gun/1.0/guide/</guid>
+ <guid>https://ninenines.eu/docs/en/gun/1.0/guide/</guid>
<description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
@@ -530,10 +550,10 @@
<item>
<title>HTTP status codes(7)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/http_status_codes/</link>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/http_status_codes/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/http_status_codes/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/http_status_codes/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
@@ -804,10 +824,10 @@ client and the connection is closed.&lt;/p&gt;&lt;/div&gt;
<item>
<title>Ranch Function Reference</title>
- <link>http://ninenines.eu/docs/en/ranch/1.2/manual/</link>
+ <link>https://ninenines.eu/docs/en/ranch/1.2/manual/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/ranch/1.2/manual/</guid>
+ <guid>https://ninenines.eu/docs/en/ranch/1.2/manual/</guid>
<description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
@@ -845,10 +865,10 @@ client and the connection is closed.&lt;/p&gt;&lt;/div&gt;
<item>
<title>Ranch User Guide</title>
- <link>http://ninenines.eu/docs/en/ranch/1.2/guide/</link>
+ <link>https://ninenines.eu/docs/en/ranch/1.2/guide/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/ranch/1.2/guide/</guid>
+ <guid>https://ninenines.eu/docs/en/ranch/1.2/guide/</guid>
<description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
@@ -896,10 +916,10 @@ client and the connection is closed.&lt;/p&gt;&lt;/div&gt;
<item>
<title>Request overview</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/overview/</link>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/guide/overview/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/overview/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/overview/</guid>
<description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This chapter explains the different steps a request
goes through until a response is sent, along with
details of the Cowboy implementation.&lt;/p&gt;&lt;/div&gt;
@@ -1048,10 +1068,10 @@ at this point, however.&lt;/p&gt;&lt;/div&gt;
<item>
<title>cowboy(3)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</link>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
@@ -1066,207 +1086,276 @@ manipulating Ranch listeners.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_exports&#34;&gt;Exports&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt; - Listen for connections using plain TCP
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt; - Listen for connections using TLS
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy.stop_listener&#34;&gt;cowboy:stop_listener(3)&lt;/a&gt; - Stop the given listener
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy.set_env&#34;&gt;cowboy:set_env(3)&lt;/a&gt; - Update a listener&amp;#8217;s environment value
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_types&#34;&gt;Types&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_fields_field&#34;&gt;fields() = [Field]&lt;/h3&gt;
+&lt;h3 id=&#34;_fields&#34;&gt;fields()&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite --&gt;
-&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Field&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;()
- | {&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;(), &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;() | [&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;()]}
- | {&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;(), &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;() | [&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;()], &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;()}]&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Fields for match operations. Constraint(s) and default value are optional.&lt;/p&gt;&lt;/div&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;fields&lt;/span&gt;&lt;/span&gt;() &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; [&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;
+ | {&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Constraints&lt;/span&gt;}
+ | {&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Constraints&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Default&lt;/span&gt;}]
+
+&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;()
+&lt;span style=&#34;color: #009900&#34;&gt;Constraints&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt; | [&lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt;]
+&lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;()
+&lt;span style=&#34;color: #009900&#34;&gt;Default&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;()&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Fields description for match operations.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This type is used in &lt;a href=&#34;../cowboy_router&#34;&gt;cowboy_router&lt;/a&gt;
+for matching bindings and in the match functions found in
+&lt;a href=&#34;../cowboy_req&#34;&gt;cowboy_req&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_http_headers_binary_iodata&#34;&gt;http_headers() = [{binary(), iodata()}]&lt;/h3&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HTTP headers as a list of key/values.&lt;/p&gt;&lt;/div&gt;
+&lt;h3 id=&#34;_http_headers&#34;&gt;http_headers()&lt;/h3&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;http_headers&lt;/span&gt;&lt;/span&gt;() &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; #{&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;binary&lt;/span&gt;&lt;/span&gt;() &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;iodata&lt;/span&gt;&lt;/span&gt;()}&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HTTP headers.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_http_status_non_neg_integer_binary&#34;&gt;http_status() = non_neg_integer() | binary()&lt;/h3&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HTTP status.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A binary status can be used to set a custom message.&lt;/p&gt;&lt;/div&gt;
+&lt;h3 id=&#34;_http_status&#34;&gt;http_status()&lt;/h3&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;http_status&lt;/span&gt;&lt;/span&gt;() &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;() | &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;binary&lt;/span&gt;&lt;/span&gt;()&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HTTP response status.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A binary status can be used to set a reason phrase. Note
+however that HTTP/2 only sends the status code and drops
+the reason phrase entirely.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_http_version_http_1_1_http_1_0&#34;&gt;http_version() = &#39;HTTP/1.1&#39; | &#39;HTTP/1.0&#39;&lt;/h3&gt;
+&lt;h3 id=&#34;_http_version&#34;&gt;http_version()&lt;/h3&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;http_version&lt;/span&gt;&lt;/span&gt;() &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;color: #FF6600&#34;&gt;&#39;HTTP/2&#39;&lt;/span&gt; | &lt;span style=&#34;color: #FF6600&#34;&gt;&#39;HTTP/1.1&#39;&lt;/span&gt; | &lt;span style=&#34;color: #FF6600&#34;&gt;&#39;HTTP/1.0&#39;&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HTTP version.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_code_onresponse_fun_fun_http_status_http_headers_iodata_cowboy_req_req_gt_cowboy_req_req_code&#34;&gt;&lt;code&gt;onresponse_fun() = fun((http_status(), http_headers(), iodata(), cowboy_req:req()) -&amp;gt; cowboy_req:req())&lt;/code&gt;&lt;/h3&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Fun called immediately before sending the response.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It can perform any operation on the Req object, including
-reading the request body or replying. If a reply is sent, it
-overrides the reply initially sent. The callback will not be
-called again for the new reply.&lt;/p&gt;&lt;/div&gt;
+&lt;h3 id=&#34;_opts&#34;&gt;opts()&lt;/h3&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;opts&lt;/span&gt;&lt;/span&gt;() &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;map&lt;/span&gt;&lt;/span&gt;()&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Options for the HTTP/1.1, HTTP/2 and Websocket protocols.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The protocol options are in a map containing all the options for
+the different protocols that may be involved when connecting
+to the listener, including HTTP/1.1 and HTTP/2 but also
+subprotocols like Websocket.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The HTTP/1.1 options are documented in the
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http(3)&lt;/a&gt; manual;
+the HTTP/2 options in
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http2(3)&lt;/a&gt;;
+and the Websocket options in
+&lt;a href=&#34;../cowboy_websocket&#34;&gt;cowboy_websocket(3)&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_exports&#34;&gt;Exports&lt;/h2&gt;
+&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_start_http_ref_nbacceptors_transopts_protoopts_8594_ok_pid&#34;&gt;start_http(Ref, NbAcceptors, TransOpts, ProtoOpts) &amp;#8594; {ok, pid()}&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Ref = ranch:ref()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../cowboy_app&#34;&gt;cowboy(7)&lt;/a&gt;,
+&lt;a href=&#34;../ranch&#34;&gt;ranch(3)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>cowboy(7)</title>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_app/</guid>
+ <description>&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy - Small, fast, modern HTTP server for Erlang/OTP&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_description&#34;&gt;Description&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Cowboy is an HTTP server for Erlang/OTP with support for the
+HTTP/1.1, HTTP/2 and Websocket protocols.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Cowboy aims to provide a complete HTTP stack. This includes
+the implementation of the HTTP RFCs but also any directly
+related standards, like Websocket or Server-Sent Events.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_modules&#34;&gt;Modules&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Functions:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-Listener name.
+&lt;a href=&#34;../cowboy&#34;&gt;cowboy(3)&lt;/a&gt; - Listener management
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-NbAcceptors = non_neg_integer()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Number of acceptor processes.
+&lt;a href=&#34;../cowboy_req&#34;&gt;cowboy_req(3)&lt;/a&gt; - Request and response
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-TransOpts = ranch_tcp:opts()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-TCP transport options.
+&lt;a href=&#34;../cowboy_router&#34;&gt;cowboy_router(3)&lt;/a&gt; - Router
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-ProtoOpts = cowboy_protocol:opts()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Protocols:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-HTTP protocol options.
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http(3)&lt;/a&gt; - HTTP/1.1
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Start listening for HTTP connections. Returns the pid for this
-listener&amp;#8217;s supervisor.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_start_https_ref_nbacceptors_transopts_protoopts_8594_ok_pid&#34;&gt;start_https(Ref, NbAcceptors, TransOpts, ProtoOpts) &amp;#8594; {ok, pid()}&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Ref = ranch:ref()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Listener name.
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http2(3)&lt;/a&gt; - HTTP/2
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-NbAcceptors = non_neg_integer()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Number of acceptor processes.
+&lt;a href=&#34;../cowboy_websocket&#34;&gt;cowboy_websocket(3)&lt;/a&gt; - Websocket
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-TransOpts = ranch_ssl:opts()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Handlers:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-SSL transport options.
+&lt;a href=&#34;../cowboy_static&#34;&gt;cowboy_static(3)&lt;/a&gt; - Static file handler
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-ProtoOpts = cowboy_protocol:opts()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Behaviors:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-HTTP protocol options.
+&lt;a href=&#34;../cowboy_handler&#34;&gt;cowboy_handler(3)&lt;/a&gt; - Plain HTTP handlers
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Start listening for HTTPS connections. Returns the pid for this
-listener&amp;#8217;s supervisor.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_stop_listener_ref_8594_ok_error_not_found&#34;&gt;stop_listener(Ref) &amp;#8594; ok | {error, not_found}&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Ref = ranch:ref()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Listener name.
+&lt;a href=&#34;../cowboy_loop&#34;&gt;cowboy_loop(3)&lt;/a&gt; - Loop handlers
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Stop a previously started listener.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_set_env_ref_name_value_8594_ok&#34;&gt;set_env(Ref, Name, Value) &amp;#8594; ok&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Ref = ranch:ref()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Listener name.
+&lt;a href=&#34;../cowboy_middleware&#34;&gt;cowboy_middleware(3)&lt;/a&gt; - Middlewares
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Name = atom()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Name of environment value.
+&lt;a href=&#34;../cowboy_rest&#34;&gt;cowboy_rest(3)&lt;/a&gt; - REST handlers
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Value = any()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Environment value.
+&lt;a href=&#34;../cowboy_stream&#34;&gt;cowboy_stream(3)&lt;/a&gt; - Stream handlers
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Set or update an environment value for an already running listener.
-This will take effect on all subsequent connections.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
-&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;a href=&#34;http://ninenines.eu/docs/en/ranch/HEAD/guide&#34;&gt;Ranch guide&lt;/a&gt;
-provides detailed information about how listeners work.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-</description>
- </item>
-
- <item>
- <title>cowboy(7)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_app/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_app/</guid>
- <description>&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
-&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy - Small, fast, modular HTTP server.&lt;/p&gt;&lt;/div&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy_sub_protocol&#34;&gt;cowboy_sub_protocol(3)&lt;/a&gt; - Sub protocols
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy_websocket&#34;&gt;cowboy_websocket(3)&lt;/a&gt; - Websocket handlers
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Middlewares:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy_router&#34;&gt;cowboy_router(3)&lt;/a&gt; - Router middleware
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowboy_handler&#34;&gt;cowboy_handler(3)&lt;/a&gt; - Handler middleware
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;cowboy&lt;/code&gt; application uses the Erlang applications &lt;code&gt;ranch&lt;/code&gt;
-for listening and accepting TCP connections, &lt;code&gt;crypto&lt;/code&gt; for
-establishing Websocket connections, and &lt;code&gt;cowlib&lt;/code&gt; for parsing and
-building messages for Web protocols. These dependencies must
-be loaded for the &lt;code&gt;cowboy&lt;/code&gt; application to work. In an embedded
-environment this means that they need to be started with the
-&lt;code&gt;application:start/{1,2}&lt;/code&gt; function before the &lt;code&gt;cowboy&lt;/code&gt;
-application is started.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;cowboy&lt;/code&gt; application also uses the Erlang applications
-&lt;code&gt;asn1&lt;/code&gt;, &lt;code&gt;public_key&lt;/code&gt; and &lt;code&gt;ssl&lt;/code&gt; when listening for HTTPS connections.
-These are started automatically if they weren&amp;#8217;t before.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../ranch&#34;&gt;ranch(7)&lt;/a&gt; - Socket acceptor pool for TCP protocols
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;../cowlib&#34;&gt;cowlib(7)&lt;/a&gt; - Support library for manipulating Web protocols
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+ssl - Secure communication over sockets
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+crypto - Crypto functions
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;All these applications must be started before the &lt;code&gt;cowboy&lt;/code&gt;
+application. To start Cowboy and all dependencies at once:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #990000&#34;&gt;_&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;application:ensure_all_started&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;cowboy&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
@@ -1276,636 +1365,571 @@ These are started automatically if they weren&amp;#8217;t before.&lt;/p&gt;&lt;/
environment configuration parameters.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../ranch&#34;&gt;ranch(7)&lt;/a&gt;,
+&lt;a href=&#34;../cowlib&#34;&gt;cowlib(7)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
</description>
</item>
<item>
- <title>cowboy_handler(3)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_handler/</link>
+ <title>cowboy:set_env(3)</title>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.set_env/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_handler/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.set_env/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy_handler - handler middleware and behaviour&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy:set_env - Update a listener&amp;#8217;s environment value&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_description&#34;&gt;Description&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;cowboy_handler&lt;/code&gt; middleware executes the handler passed
-through the environment values &lt;code&gt;handler&lt;/code&gt; and &lt;code&gt;handler_opts&lt;/code&gt;,
-and adds the result of this execution to the environment as
-the value &lt;code&gt;result&lt;/code&gt;, indicating that the request has been
-handled and received a response.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Environment input:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;set_env&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch:ref&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;Key&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;Value&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;())
+ &lt;span style=&#34;color: #990000&#34;&gt;-&amp;gt;&lt;/span&gt; &lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Set or update an environment value for a previously started
+listener.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This is most useful for updating the routes dynamically,
+without having to restart the listener.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The new value will only be available to new connections.
+Pre-existing connections will still use the old value.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_arguments&#34;&gt;Arguments&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-handler = module()
+Name
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-Handler to be executed.
+The name of the listener to update.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The name of the listener is the first argument given to the
+&lt;a href=&#34;../cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt; or
+&lt;a href=&#34;../ranch.start_listener&#34;&gt;ranch:start_listener(3)&lt;/a&gt; function.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-handler_opts = any()
+Key
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-Options to be passed to the handler.
+The key in the environment map. Common keys include &lt;code&gt;dispatch&lt;/code&gt;
+and &lt;code&gt;middlewares&lt;/code&gt;.
&lt;/p&gt;
&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Environment output:&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-result = ok
+Value
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-Result of the request.
+The new value.
&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This module also defines the &lt;code&gt;cowboy_handler&lt;/code&gt; behaviour that
-defines the basic interface for handlers. All Cowboy handlers
-implement at least the &lt;code&gt;init/2&lt;/code&gt; callback, and may implement
-the &lt;code&gt;terminate/3&lt;/code&gt; callback optionally.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The type of the value differs depending on the key.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_terminate_reasons&#34;&gt;Terminate reasons&lt;/h2&gt;
+&lt;h2 id=&#34;_return_value&#34;&gt;Return value&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The following values may be received as the terminate reason
-in the optional &lt;code&gt;terminate/3&lt;/code&gt; callback. Different handler types
-may define additional terminate reasons.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-normal
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- The connection was closed normally.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-{crash, Class, Reason}
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- A crash occurred in the handler. &lt;code&gt;Class&lt;/code&gt; and &lt;code&gt;Reason&lt;/code&gt; can be
- used to obtain more information about the crash. The function
- &lt;code&gt;erlang:get_stacktrace/0&lt;/code&gt; can also be called to obtain the
- stacktrace of the process when the crash occurred.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The atom &lt;code&gt;ok&lt;/code&gt; is returned on success.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;An &lt;code&gt;exit:badarg&lt;/code&gt; exception is thrown when the listener does
+not exist.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_callbacks&#34;&gt;Callbacks&lt;/h2&gt;
+&lt;h2 id=&#34;_changelog&#34;&gt;Changelog&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_init_req_opts_8594_ok_req_state_module_req_state_module_req_state_hibernate_timeout_module_req_state_timeout_hibernate&#34;&gt;init(Req, Opts) &amp;#8594; {ok, Req, State} | {Module, Req, State} | {Module, Req, State, hibernate | Timeout} | {Module, Req, State, Timeout, hibernate}&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Req = cowboy_req:req()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-The Req object.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Opts = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Handler options.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-State = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Handler state.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Module = module()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Module of the sub-protocol to use.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Timeout = timeout()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-Timeout passed to the sub-protocol, when applicable.
+&lt;strong&gt;1.0&lt;/strong&gt;: Function introduced.
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Process the request.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This function can be used to switch to an alternate handler
-type by returning the name of the module to be used, along
-with a few options.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;For basic handlers this is the function where the response
-should be sent. If no response is sent, Cowboy will ensure
-that a &lt;code&gt;204 No Content&lt;/code&gt; response is sent.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A crash in this callback will result in &lt;code&gt;terminate/3&lt;/code&gt; being
-called if it is defined, with the &lt;code&gt;State&lt;/code&gt; argument set to
-the value of &lt;code&gt;Opts&lt;/code&gt; originally given to the &lt;code&gt;init/2&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
&lt;/div&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_terminate_reason_req_state_8594_ok&#34;&gt;terminate(Reason, Req, State) &amp;#8594; ok&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Reason = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Reason for termination.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Req = cowboy_req:req()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-The Req object.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-State = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Handler state.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Perform any necessary cleanup of the state.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This callback should release any resource currently in use,
-clear any active timer and reset the process to its original
-state, as it might be reused for future requests sent on the
-same connection. Typical plain HTTP handlers rarely need to
-use it.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A crash in this callback or an invalid return value will
-result in the closing of the connection and the termination
-of the process.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_examples&#34;&gt;Examples&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Update a listener&amp;#8217;s routes&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_router:compile&lt;/span&gt;&lt;/span&gt;([
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;&#39;_&#39;&lt;/span&gt;, [
+ {&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;/&#34;&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;toppage_h&lt;/span&gt;, []},
+ {&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;/ws&#34;&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;websocket_h&lt;/span&gt;, []}
+ ]}
+]),
+
+&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:set_env&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;example&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;dispatch&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_exports&#34;&gt;Exports&lt;/h2&gt;
+&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_terminate_reason_req_state_handler_8594_ok&#34;&gt;terminate(Reason, Req, State, Handler) &amp;#8594; ok&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Reason = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Reason for termination.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Req = cowboy_req:req()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-The Req object.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-State = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Handler state.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Handler = module()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Handler module.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Call the optional &lt;code&gt;terminate/3&lt;/code&gt; callback if it exists.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This function should always be called at the end of the execution
-of a handler, to give it a chance to clean up or perform
-miscellaneous operations.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../cowboy&#34;&gt;cowboy(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt;,
+&lt;a href=&#34;../ranch.set_protocol_options&#34;&gt;ranch:set_protocol_options(3)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
</item>
<item>
- <title>cowboy_loop(3)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_loop/</link>
+ <title>cowboy:start_clear(3)</title>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.start_clear/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_loop/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.start_clear/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy_loop - loop handlers&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy:start_clear - Listen for connections using plain TCP&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_description&#34;&gt;Description&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;cowboy_loop&lt;/code&gt; module implements a handler interface for
-long running HTTP connections. It is the recommended interface
-for long polling and server-sent events, amongst others.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This module is a sub protocol that defines three callbacks to
-be implemented by handlers. The &lt;code&gt;init/2&lt;/code&gt; and &lt;code&gt;terminate/3&lt;/code&gt;
-callbacks are common to all handler types and are documented
-in the manual for the &lt;a href=&#34;cowboy_handler.asciidoc&#34;&gt;cowboy_handler&lt;/a&gt; module.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;info/3&lt;/code&gt; callback is specific to loop handlers and will be
-called as many times as necessary until a reply is sent.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It is highly recommended to return a timeout value from the
-&lt;code&gt;init/2&lt;/code&gt; callback to ensure that the process is terminated
-when no data has been received during that timespan. The
-default timeout is &lt;code&gt;infinity&lt;/code&gt;, which should only be used if
-you have alternate means of ending inactive connections.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;start_clear&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch:ref&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;NumAcceptors&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;TransportOpts&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch_tcp:opts&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;ProtocolOpts&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;opts&lt;/span&gt;&lt;/span&gt;())
+ &lt;span style=&#34;color: #990000&#34;&gt;-&amp;gt;&lt;/span&gt; {&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ListenerPid&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;pid&lt;/span&gt;&lt;/span&gt;()}
+ | {&lt;span style=&#34;color: #FF6600&#34;&gt;error&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;()}&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Start listening for connections over a clear TCP channel.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Both HTTP/1.1 and HTTP/2 are supported on this listener.
+HTTP/2 has two methods of establishing a connection over
+a clear TCP channel. Both the upgrade and the prior knowledge
+methods are supported.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_terminate_reasons&#34;&gt;Terminate reasons&lt;/h2&gt;
+&lt;h2 id=&#34;_arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The following values may be received as the terminate reason
-in the optional &lt;code&gt;terminate/3&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-normal
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- The connection was closed normally before switching to the
- loop sub protocol. This typically happens if an &lt;code&gt;ok&lt;/code&gt; tuple is
- returned from the &lt;code&gt;init/2&lt;/code&gt; callback.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-stop
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- The handler requested to close the connection by returning
- a &lt;code&gt;stop&lt;/code&gt; tuple.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-timeout
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- The connection has been closed due to inactivity. The timeout
- value can be configured from &lt;code&gt;init/2&lt;/code&gt;. The response sent when
- this happens is a &lt;code&gt;204 No Content&lt;/code&gt;.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-{crash, Class, Reason}
+Name
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
- A crash occurred in the handler. &lt;code&gt;Class&lt;/code&gt; and &lt;code&gt;Reason&lt;/code&gt; can be
- used to obtain more information about the crash. The function
- &lt;code&gt;erlang:get_stacktrace/0&lt;/code&gt; can also be called to obtain the
- stacktrace of the process when the crash occurred.
+The listener name is used to refer to this listener in
+future calls, for example when stopping it or when
+updating the routes defined.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It can be any Erlang term. An atom is generally good enough,
+for example &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;my_app_clear&lt;/code&gt; or &lt;code&gt;my_app_tls&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-{error, overflow}
+NumAcceptors
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
- The connection is being closed and the process terminated
- because the buffer Cowboy uses to keep data sent by the
- client has reached its maximum. The buffer size can be
- configured through the environment value &lt;code&gt;loop_max_buffer&lt;/code&gt;
- and defaults to 5000 bytes.
- &lt;br /&gt;
- If the long running request comes with a body it is recommended
- to process this body before switching to the loop sub protocol.
-&lt;/p&gt;
+The number of acceptors is the number of processes that
+will accept connections. Tweak this value to improve the
+accept rate for incoming connections.
+&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The ideal value is between 10 and 100 on most systems.
+Larger values may have the opposite effect and reduce the
+accept rate. It&amp;#8217;s generally safe to start with a value of
+100 (or 10 on low memory systems). Then, when accept rates
+become a concern, measure the performance and update the
+value accordingly.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This value is unrelated to the maximum number of concurrent
+connections.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-{error, closed}
+TransportOpts
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
- The socket has been closed brutally without a close frame being
- received first.
+The transport options are where the TCP options, including
+the listener&amp;#8217;s port number, are defined. Transport options
+are provided as a list of keys and values, for example
+&lt;code&gt;[{port, 8080}]&lt;/code&gt;.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The available options are documented in the
+&lt;a href=&#34;../ranch_tcp&#34;&gt;ranch_tcp(3)&lt;/a&gt; manual.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-{error, Reason}
+ProtocolOpts
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
- A socket error ocurred.
-&lt;/p&gt;
+The protocol options are in a map containing all the options for
+the different protocols that may be involved when connecting
+to the listener, including HTTP/1.1 and HTTP/2 but also
+subprotocols like Websocket.
+&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The HTTP/1.1 options are documented in the
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http(3)&lt;/a&gt; manual;
+the HTTP/2 options in
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http2(3)&lt;/a&gt;;
+and the Websocket options in
+&lt;a href=&#34;../cowboy_websocket&#34;&gt;cowboy_websocket(3)&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_callbacks&#34;&gt;Callbacks&lt;/h2&gt;
+&lt;h2 id=&#34;_return_value&#34;&gt;Return value&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_info_info_req_state_8594_ok_req_state_ok_req_state_hibernate_stop_req_state&#34;&gt;info(Info, Req, State) &amp;#8594; {ok, Req, State} | {ok, Req, State, hibernate} | {stop, Req, State}&lt;/h3&gt;
-&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Info = any()
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
-Message received by the process.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Req = cowboy_req:req()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;An ok tuple is returned on success. It contains the pid of
+the top-level supervisor for the listener.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;An error tuple is returned on error. The error reason may
+be any Erlang term.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A common error is &lt;code&gt;eaddrinuse&lt;/code&gt;. It indicates that the port
+configured for Cowboy is already in use.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_changelog&#34;&gt;Changelog&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-The Req object.
+&lt;strong&gt;2.0&lt;/strong&gt;: HTTP/2 support added.
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-State = any()
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/li&gt;
+&lt;li&gt;
&lt;p&gt;
-Handler state.
+&lt;strong&gt;2.0&lt;/strong&gt;: Function introduced. Replaces &lt;code&gt;cowboy:start_http/4&lt;/code&gt;.
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Handle the Erlang message received.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This function will be called every time an Erlang message
-has been received. The message can be any Erlang term.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;stop&lt;/code&gt; return value can be used to stop the receive loop,
-typically because a response has been sent.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;hibernate&lt;/code&gt; option will hibernate the process until
-it receives another message.&lt;/p&gt;&lt;/div&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_examples&#34;&gt;Examples&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Start a listener&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_router:compile&lt;/span&gt;&lt;/span&gt;([
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;&#39;_&#39;&lt;/span&gt;, [
+ {&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;/&#34;&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;toppage_h&lt;/span&gt;, []}
+ ]}
+]),
+
+{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #990000&#34;&gt;_&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:start_clear&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;example&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;100&lt;/span&gt;, [{&lt;span style=&#34;color: #FF6600&#34;&gt;port&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;8080&lt;/span&gt;}], #{
+ &lt;span style=&#34;color: #0000FF&#34;&gt;env&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; #{&lt;span style=&#34;color: #0000FF&#34;&gt;dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt;}
+})&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Start a listener on a random port&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color: #FF6600&#34;&gt;example&lt;/span&gt;,
+
+{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #990000&#34;&gt;_&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:start_clear&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;100&lt;/span&gt;, [], #{
+ &lt;span style=&#34;color: #0000FF&#34;&gt;env&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; #{&lt;span style=&#34;color: #0000FF&#34;&gt;dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt;}
+}),
+
+&lt;span style=&#34;color: #009900&#34;&gt;Port&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch:get_port&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../cowboy&#34;&gt;cowboy(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt;,
+&lt;a href=&#34;../ranch&#34;&gt;ranch(3)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
</item>
<item>
- <title>cowboy_middleware(3)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_middleware/</link>
+ <title>cowboy:start_tls(3)</title>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.start_tls/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_middleware/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.start_tls/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy_middleware - behaviour for middlewares&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy:start_tls - Listen for connections using TLS&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_description&#34;&gt;Description&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;cowboy_middleware&lt;/code&gt; behaviour defines the interface used
-by Cowboy middleware modules.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Middlewares process the request sequentially in the order they
-are configured.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_types&#34;&gt;Types&lt;/h2&gt;
-&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_env_atom_any&#34;&gt;env() = [{atom(), any()}]&lt;/h3&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The environment variable.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;One is created for every request. It is passed to each
-middleware module executed and subsequently returned,
-optionally with its contents modified.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;start_tls&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch:ref&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;NumAcceptors&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;TransportOpts&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch_ssl:opts&lt;/span&gt;&lt;/span&gt;(),
+ &lt;span style=&#34;color: #009900&#34;&gt;ProtocolOpts&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;opts&lt;/span&gt;&lt;/span&gt;())
+ &lt;span style=&#34;color: #990000&#34;&gt;-&amp;gt;&lt;/span&gt; {&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ListenerPid&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;pid&lt;/span&gt;&lt;/span&gt;()}
+ | {&lt;span style=&#34;color: #FF6600&#34;&gt;error&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;()}&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Start listening for connections over a secure TLS channel.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Both HTTP/1.1 and HTTP/2 are supported on this listener.
+The ALPN TLS extension must be used to initiate an HTTP/2
+connection.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_callbacks&#34;&gt;Callbacks&lt;/h2&gt;
+&lt;h2 id=&#34;_arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_execute_req_env_8594_ok_req_env_suspend_module_function_args_stop_req&#34;&gt;execute(Req, Env) &amp;#8594; {ok, Req, Env} | {suspend, Module, Function, Args} | {stop, Req}&lt;/h3&gt;
&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-Req = cowboy_req:req()
+Name
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-The Req object.
+The listener name is used to refer to this listener in
+future calls, for example when stopping it or when
+updating the routes defined.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It can be any Erlang term. An atom is generally good enough,
+for example &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;my_app_clear&lt;/code&gt; or &lt;code&gt;my_app_tls&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-Env = env()
+NumAcceptors
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-The request environment.
-&lt;/p&gt;
+The number of acceptors is the number of processes that
+will accept connections. Tweak this value to improve the
+accept rate for incoming connections.
+&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The ideal value is between 10 and 100 on most systems.
+Larger values may have the opposite effect and reduce the
+accept rate. It&amp;#8217;s generally safe to start with a value of
+100 (or 10 on low memory systems). Then, when accept rates
+become a concern, measure the performance and update the
+value accordingly.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This value is unrelated to the maximum number of concurrent
+connections.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-Module = module()
+TransportOpts
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-MFA to call when resuming the process.
+The transport options are where the TCP options, including
+the listener&amp;#8217;s port number, are defined. They also contain
+the TLS options, like the server&amp;#8217;s certificate. Transport options
+are provided as a list of keys and values, for example
+&lt;code&gt;[{port, 8443}, {certfile, &#34;path/to/cert.pem&#34;}]&lt;/code&gt;.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The available options are documented in the
+&lt;a href=&#34;../ranch_ssl&#34;&gt;ranch_ssl(3)&lt;/a&gt; manual.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-Function = atom()
+ProtocolOpts
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
-MFA to call when resuming the process.
-&lt;/p&gt;
+The protocol options are in a map containing all the options for
+the different protocols that may be involved when connecting
+to the listener, including HTTP/1.1 and HTTP/2 but also
+subprotocols like Websocket.
+&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The HTTP/1.1 options are documented in the
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http(3)&lt;/a&gt; manual;
+the HTTP/2 options in
+&lt;a href=&#34;../cowboy_http&#34;&gt;cowboy_http2(3)&lt;/a&gt;;
+and the Websocket options in
+&lt;a href=&#34;../cowboy_websocket&#34;&gt;cowboy_websocket(3)&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-Args = [any()]
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/dl&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_return_value&#34;&gt;Return value&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;An ok tuple is returned on success. It contains the pid of
+the top-level supervisor for the listener.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;An error tuple is returned on error. The error reason may
+be any Erlang term.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A common error is &lt;code&gt;eaddrinuse&lt;/code&gt;. It indicates that the port
+configured for Cowboy is already in use.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_changelog&#34;&gt;Changelog&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
-MFA to call when resuming the process.
+&lt;strong&gt;2.0&lt;/strong&gt;: HTTP/2 support added.
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Execute the middleware.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;ok&lt;/code&gt; return value indicates that everything went well
-and that Cowboy should continue processing the request. A
-response may or may not have been sent.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;suspend&lt;/code&gt; return value will hibernate the process until
-an Erlang message is received. Note that when resuming, any
-previous stacktrace information will be gone.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;stop&lt;/code&gt; return value stops Cowboy from doing any further
-processing of the request, even if there are middlewares
-that haven&amp;#8217;t been executed yet. The connection may be left
-open to receive more requests from the client.&lt;/p&gt;&lt;/div&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;strong&gt;2.0&lt;/strong&gt;: Function introduced. Replaces &lt;code&gt;cowboy:start_https/4&lt;/code&gt;.
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_examples&#34;&gt;Examples&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Start a listener&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_router:compile&lt;/span&gt;&lt;/span&gt;([
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;&#39;_&#39;&lt;/span&gt;, [
+ {&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;/&#34;&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;toppage_h&lt;/span&gt;, []}
+ ]}
+]),
+
+{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #990000&#34;&gt;_&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:start_tls&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;example&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;100&lt;/span&gt;, [
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;port&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;8443&lt;/span&gt;},
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;cert&lt;/span&gt;, &lt;span style=&#34;color: #FF0000&#34;&gt;&#34;path/to/cert.pem&#34;&lt;/span&gt;}
+], #{
+ &lt;span style=&#34;color: #0000FF&#34;&gt;env&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; #{&lt;span style=&#34;color: #0000FF&#34;&gt;dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt;}
+})&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Start a listener on a random port&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color: #FF6600&#34;&gt;example&lt;/span&gt;,
+
+{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #990000&#34;&gt;_&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:start_tls&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;100&lt;/span&gt;, [
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;cert&lt;/span&gt;, &lt;span style=&#34;color: #FF0000&#34;&gt;&#34;path/to/cert.pem&#34;&lt;/span&gt;}
+], #{
+ &lt;span style=&#34;color: #0000FF&#34;&gt;env&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; #{&lt;span style=&#34;color: #0000FF&#34;&gt;dispatch&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Dispatch&lt;/span&gt;}
+}),
+
+&lt;span style=&#34;color: #009900&#34;&gt;Port&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch:get_port&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../cowboy&#34;&gt;cowboy(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt;,
+&lt;a href=&#34;../ranch&#34;&gt;ranch(3)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
&lt;/div&gt;
</description>
</item>
<item>
- <title>cowboy_protocol(3)</title>
- <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_protocol/</link>
+ <title>cowboy:stop_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.stop_listener/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
- <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_protocol/</guid>
+ <guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.stop_listener/</guid>
<description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_name&#34;&gt;Name&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy_protocol - HTTP protocol&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;cowboy:stop_listener - Stop the given listener&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_description&#34;&gt;Description&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;cowboy_protocol&lt;/code&gt; module implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.&lt;/p&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-&lt;div class=&#34;sect1&#34;&gt;
-&lt;h2 id=&#34;_types&#34;&gt;Types&lt;/h2&gt;
-&lt;div class=&#34;sectionbody&#34;&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_opts_option&#34;&gt;opts() = [Option]&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite --&gt;
-&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Option&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; {&lt;span style=&#34;color: #FF6600&#34;&gt;compress&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;boolean&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;env&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_middleware:env&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;max_empty_lines&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;max_header_name_length&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;max_header_value_length&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;max_headers&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;max_keepalive&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;max_request_line_length&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;non_neg_integer&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;middlewares&lt;/span&gt;, [&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;module&lt;/span&gt;&lt;/span&gt;()]}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;onresponse&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:onresponse_fun&lt;/span&gt;&lt;/span&gt;()}
- | {&lt;span style=&#34;color: #FF6600&#34;&gt;timeout&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;timeout&lt;/span&gt;&lt;/span&gt;()}&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Configuration for the HTTP protocol handler.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This configuration is passed to Cowboy when starting listeners
-using &lt;code&gt;cowboy:start_http/4&lt;/code&gt; or &lt;code&gt;cowboy:start_https/4&lt;/code&gt; functions.&lt;/p&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It can be updated without restarting listeners using the
-Ranch functions &lt;code&gt;ranch:get_protocol_options/1&lt;/code&gt; and
-&lt;code&gt;ranch:set_protocol_options/2&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;stop_listener&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;ranch:ref&lt;/span&gt;&lt;/span&gt;())
+ &lt;span style=&#34;color: #990000&#34;&gt;-&amp;gt;&lt;/span&gt; &lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt; | {&lt;span style=&#34;color: #FF6600&#34;&gt;error&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;not_found&lt;/span&gt;}&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Stop a previously started listener.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Alias of &lt;a href=&#34;../ranch.stop_listener&#34;&gt;ranch:stop_listener(3)&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
-&lt;div class=&#34;sect2&#34;&gt;
-&lt;h3 id=&#34;_option_descriptions&#34;&gt;Option descriptions&lt;/h3&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The default value is given next to the option name.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_arguments&#34;&gt;Arguments&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
&lt;dt class=&#34;hdlist1&#34;&gt;
-compress (false)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- When enabled, Cowboy will attempt to compress the response body.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-env ([{listener, Ref}])
+Name
&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;
- Initial middleware environment.
+The name of the listener to be stopped.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The name of the listener is the first argument given to the
+&lt;a href=&#34;../cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt; or
+&lt;a href=&#34;../ranch.start_listener&#34;&gt;ranch:start_listener(3)&lt;/a&gt; function.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-max_empty_lines (5)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Maximum number of empty lines before a request.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-max_header_name_length (64)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Maximum length of header names.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-max_header_value_length (4096)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Maximum length of header values.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-max_headers (100)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Maximum number of headers allowed per request.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-max_keepalive (100)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Maximum number of requests allowed per connection.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-max_request_line_length (4096)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Maximum length of the request line.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-middlewares ([cowboy_router, cowboy_handler])
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- List of middlewares to execute for every requests.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-onresponse (undefined)
-&lt;/dt&gt;
-&lt;dd&gt;
-&lt;p&gt;
- Fun called every time a response is sent.
-&lt;/p&gt;
-&lt;/dd&gt;
-&lt;dt class=&#34;hdlist1&#34;&gt;
-timeout (5000)
-&lt;/dt&gt;
-&lt;dd&gt;
+&lt;/dl&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_return_value&#34;&gt;Return value&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The atom &lt;code&gt;ok&lt;/code&gt; is returned on success.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;{error, not_found}&lt;/code&gt; tuple is returned when the listener
+does not exist.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_changelog&#34;&gt;Changelog&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
&lt;p&gt;
- Time in ms with no requests before Cowboy closes the connection.
+&lt;strong&gt;1.0&lt;/strong&gt;: Function introduced.
&lt;/p&gt;
-&lt;/dd&gt;
-&lt;/dl&gt;&lt;/div&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_examples&#34;&gt;Examples&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Stop a listener&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #0000FF&#34;&gt;ok&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy:stop_listener&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;example&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_see_also&#34;&gt;See also&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../cowboy&#34;&gt;cowboy(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_clear&#34;&gt;cowboy:start_clear(3)&lt;/a&gt;,
+&lt;a href=&#34;../cowboy.start_tls&#34;&gt;cowboy:start_tls(3)&lt;/a&gt;,
+&lt;a href=&#34;../ranch&#34;&gt;ranch(3)&lt;/a&gt;,
+&lt;a href=&#34;../ranch.start_listener&#34;&gt;ranch:start_listener(3)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
&lt;/div&gt;
</description>
</item>