summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy')
-rw-r--r--docs/en/cowboy/2.0/guide/getting_started.asciidoc2
-rw-r--r--docs/en/cowboy/2.0/guide/getting_started/index.html2
-rw-r--r--docs/en/cowboy/2.0/guide/listeners.asciidoc4
-rw-r--r--docs/en/cowboy/2.0/guide/listeners/index.html4
-rw-r--r--docs/en/cowboy/2.0/guide/routing.asciidoc2
-rw-r--r--docs/en/cowboy/2.0/guide/routing/index.html2
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html23
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html23
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_http/index.html2
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_http2/index.html2
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html2
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_websocket/index.html15
12 files changed, 29 insertions, 54 deletions
diff --git a/docs/en/cowboy/2.0/guide/getting_started.asciidoc b/docs/en/cowboy/2.0/guide/getting_started.asciidoc
index 7fb787d1..29a406bd 100644
--- a/docs/en/cowboy/2.0/guide/getting_started.asciidoc
+++ b/docs/en/cowboy/2.0/guide/getting_started.asciidoc
@@ -99,7 +99,7 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [{"/", hello_handler, []}]}
]),
- {ok, _} = cowboy:start_clear(my_http_listener, 100,
+ {ok, _} = cowboy:start_clear(my_http_listener,
[{port, 8080}],
#{env => #{dispatch => Dispatch}}
),
diff --git a/docs/en/cowboy/2.0/guide/getting_started/index.html b/docs/en/cowboy/2.0/guide/getting_started/index.html
index 5abd3779..24cd3c71 100644
--- a/docs/en/cowboy/2.0/guide/getting_started/index.html
+++ b/docs/en/cowboy/2.0/guide/getting_started/index.html
@@ -175,7 +175,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
{<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>,
+ {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
[{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
#{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
),
diff --git a/docs/en/cowboy/2.0/guide/listeners.asciidoc b/docs/en/cowboy/2.0/guide/listeners.asciidoc
index 7d5faec0..d905c686 100644
--- a/docs/en/cowboy/2.0/guide/listeners.asciidoc
+++ b/docs/en/cowboy/2.0/guide/listeners.asciidoc
@@ -31,7 +31,7 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [{"/", hello_handler, []}]}
]),
- {ok, _} = cowboy:start_clear(my_http_listener, 100,
+ {ok, _} = cowboy:start_clear(my_http_listener,
[{port, 8080}],
#{env => #{dispatch => Dispatch}}
),
@@ -75,7 +75,7 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [{"/", hello_handler, []}]}
]),
- {ok, _} = cowboy:start_tls(my_http_listener, 100,
+ {ok, _} = cowboy:start_tls(my_http_listener,
[
{port, 8443},
{certfile, "/path/to/certfile"},
diff --git a/docs/en/cowboy/2.0/guide/listeners/index.html b/docs/en/cowboy/2.0/guide/listeners/index.html
index 0b03ab16..49d841c6 100644
--- a/docs/en/cowboy/2.0/guide/listeners/index.html
+++ b/docs/en/cowboy/2.0/guide/listeners/index.html
@@ -96,7 +96,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
{<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>,
+ {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
[{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
#{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
),
@@ -136,7 +136,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
{<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>,
+ {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>,
[
{<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
{<span style="color: #FF6600">certfile</span>, <span style="color: #FF0000">"/path/to/certfile"</span>},
diff --git a/docs/en/cowboy/2.0/guide/routing.asciidoc b/docs/en/cowboy/2.0/guide/routing.asciidoc
index dec089ad..2d8a1f27 100644
--- a/docs/en/cowboy/2.0/guide/routing.asciidoc
+++ b/docs/en/cowboy/2.0/guide/routing.asciidoc
@@ -203,7 +203,7 @@ Dispatch = cowboy_router:compile([
{'_', [{'_', my_handler, #{}}]}
]),
%% Name, NbAcceptors, TransOpts, ProtoOpts
-cowboy:start_clear(my_http_listener, 100,
+cowboy:start_clear(my_http_listener,
[{port, 8080}],
#{env => #{dispatch => Dispatch}}
).
diff --git a/docs/en/cowboy/2.0/guide/routing/index.html b/docs/en/cowboy/2.0/guide/routing/index.html
index ceb1e202..2cfe01b7 100644
--- a/docs/en/cowboy/2.0/guide/routing/index.html
+++ b/docs/en/cowboy/2.0/guide/routing/index.html
@@ -300,7 +300,7 @@ http://www.gnu.org/software/src-highlite -->
{<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, #{}}]}
]),
<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>,
+<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
[{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
#{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
)<span style="color: #990000">.</span></tt></pre></div></div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html b/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html
index 12baac8f..81f53fd4 100644
--- a/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html
@@ -82,7 +82,6 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000000">start_clear</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">NumAcceptors</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(),
<span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_tcp:opts</span></span>(),
<span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
<span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
@@ -111,24 +110,6 @@ updating the routes defined.
for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
</dd>
<dt class="hdlist1">
-NumAcceptors
-</dt>
-<dd>
-<p>
-The number of acceptors is the number of processes that
-will accept connections. Tweak this value to improve the
-accept rate for incoming connections.
-</p>
-<div class="paragraph"><p>The ideal value is between 10 and 100 on most systems.
-Larger values may have the opposite effect and reduce the
-accept rate. It&#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.</p></div>
-<div class="paragraph"><p>This value is unrelated to the maximum number of concurrent
-connections.</p></div>
-</dd>
-<dt class="hdlist1">
TransportOpts
</dt>
<dd>
@@ -204,7 +185,7 @@ http://www.gnu.org/software/src-highlite -->
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #993399">100</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
+{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
})<span style="color: #990000">.</span></tt></pre></div></div>
<div class="listingblock">
@@ -215,7 +196,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="color: #009900">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, <span style="color: #993399">100</span>, [], #{
+{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, [], #{
<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
}),
diff --git a/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html b/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html
index d6da6ced..47097caf 100644
--- a/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html
@@ -82,7 +82,6 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000000">start_tls</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">NumAcceptors</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(),
<span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_ssl:opts</span></span>(),
<span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
<span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
@@ -110,24 +109,6 @@ updating the routes defined.
for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
</dd>
<dt class="hdlist1">
-NumAcceptors
-</dt>
-<dd>
-<p>
-The number of acceptors is the number of processes that
-will accept connections. Tweak this value to improve the
-accept rate for incoming connections.
-</p>
-<div class="paragraph"><p>The ideal value is between 10 and 100 on most systems.
-Larger values may have the opposite effect and reduce the
-accept rate. It&#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.</p></div>
-<div class="paragraph"><p>This value is unrelated to the maximum number of concurrent
-connections.</p></div>
-</dd>
-<dt class="hdlist1">
TransportOpts
</dt>
<dd>
@@ -204,7 +185,7 @@ http://www.gnu.org/software/src-highlite -->
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #993399">100</span>, [
+{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
{<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
{<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
], #{
@@ -218,7 +199,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="color: #009900">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, <span style="color: #993399">100</span>, [
+{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, [
{<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
], #{
<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
diff --git a/docs/en/cowboy/2.0/manual/cowboy_http/index.html b/docs/en/cowboy/2.0/manual/cowboy_http/index.html
index d80ae6a0..5fd3cecf 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_http/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_http/index.html
@@ -107,7 +107,7 @@ http://www.gnu.org/software/src-highlite -->
}</tt></pre></div></div>
<div class="paragraph"><p>Configuration for the HTTP/1.1 protocol.</p></div>
<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/4</code> or <code>cowboy:start_tls/4</code> functions.</p></div>
+using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
<div class="paragraph"><p>It can be updated without restarting listeners using the
Ranch functions <code>ranch:get_protocol_options/1</code> and
<code>ranch:set_protocol_options/2</code>.</p></div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy_http2/index.html b/docs/en/cowboy/2.0/manual/cowboy_http2/index.html
index 2f41d466..ae0b7103 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_http2/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_http2/index.html
@@ -99,7 +99,7 @@ http://www.gnu.org/software/src-highlite -->
}</tt></pre></div></div>
<div class="paragraph"><p>Configuration for the HTTP/2 protocol.</p></div>
<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/4</code> or <code>cowboy:start_tls/4</code> functions.</p></div>
+using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
<div class="paragraph"><p>It can be updated without restarting listeners using the
Ranch functions <code>ranch:get_protocol_options/1</code> and
<code>ranch:set_protocol_options/2</code>.</p></div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html
index c7b02ee2..58e60685 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html
@@ -137,7 +137,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #FF0000"> ]}</span>
<span style="color: #FF0000">]),</span>
-<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, 100, [{port, 8080}], #{</span>
+<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span>
<span style="color: #FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</span>
<span style="color: #FF0000">}).</span></tt></pre></div></div>
</div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
index 9647657b..f09890a8 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
@@ -255,7 +255,8 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000000">opts</span></span>() <span style="color: #990000">::</span> #{
<span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()
+ <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
+ <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>((<span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>())
}</tt></pre></div></div>
<div class="paragraph"><p>Websocket handler options.</p></div>
<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
@@ -290,6 +291,18 @@ idle_timeout (60000)
the client.
</p>
</dd>
+<dt class="hdlist1">
+req_filter
+</dt>
+<dd>
+<p>
+ A function applied to the Req to compact it and
+ only keep required information. The Req is only
+ given back in the <code>terminate/3</code> callback. By default
+ it keeps the method, version, URI components and peer
+ information.
+</p>
+</dd>
</dl></div>
</div>
</div>