diff options
Diffstat (limited to 'docs')
116 files changed, 2285 insertions, 1020 deletions
diff --git a/docs/en/cowboy/1.0/index.html b/docs/en/cowboy/1.0/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/cowboy/1.0/index.html +++ b/docs/en/cowboy/1.0/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/cowboy/2.0/guide/architecture/index.html b/docs/en/cowboy/2.0/guide/architecture/index.html index 6f2015d6..0b3f8cb7 100644 --- a/docs/en/cowboy/2.0/guide/architecture/index.html +++ b/docs/en/cowboy/2.0/guide/architecture/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Architecture</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -127,13 +127,13 @@ only processing short-lived requests.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/ws_handlers/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_handlers/"> Websocket handlers </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/broken_clients/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/broken_clients/"> Dealing with broken clients </a> diff --git a/docs/en/cowboy/2.0/guide/broken_clients/index.html b/docs/en/cowboy/2.0/guide/broken_clients/index.html index dd8fb375..3860e51e 100644 --- a/docs/en/cowboy/2.0/guide/broken_clients/index.html +++ b/docs/en/cowboy/2.0/guide/broken_clients/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Dealing with broken clients</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -141,13 +141,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/architecture/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/architecture/"> Architecture </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/middlewares/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/middlewares/"> Middlewares </a> diff --git a/docs/en/cowboy/2.0/guide/constraints/index.html b/docs/en/cowboy/2.0/guide/constraints/index.html index 433c02da..10a80953 100644 --- a/docs/en/cowboy/2.0/guide/constraints/index.html +++ b/docs/en/cowboy/2.0/guide/constraints/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Constraints</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -183,13 +183,13 @@ to ensure that we do not crash when the input is invalid.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/routing/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/routing/"> Routing </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/handlers/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/handlers/"> Handlers </a> diff --git a/docs/en/cowboy/2.0/guide/cookies/index.html b/docs/en/cowboy/2.0/guide/cookies/index.html index d516af72..2ea3e430 100644 --- a/docs/en/cowboy/2.0/guide/cookies/index.html +++ b/docs/en/cowboy/2.0/guide/cookies/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Using cookies</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -216,13 +216,13 @@ exception is thrown.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/resp/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/resp/"> Sending a response </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/"> Multipart requests </a> diff --git a/docs/en/cowboy/2.0/guide/erlang_web/index.html b/docs/en/cowboy/2.0/guide/erlang_web/index.html index d2db7199..bd578340 100644 --- a/docs/en/cowboy/2.0/guide/erlang_web/index.html +++ b/docs/en/cowboy/2.0/guide/erlang_web/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Erlang and the Web</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -266,13 +266,13 @@ ebook version.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/modern_web/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/modern_web/"> The modern Web </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/introduction/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/introduction/"> Introduction </a> diff --git a/docs/en/cowboy/2.0/guide/flow_diagram/index.html b/docs/en/cowboy/2.0/guide/flow_diagram/index.html index 79908680..7ec5684f 100644 --- a/docs/en/cowboy/2.0/guide/flow_diagram/index.html +++ b/docs/en/cowboy/2.0/guide/flow_diagram/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Flow diagram</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -79,13 +79,13 @@ <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/"> Getting started </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/listeners/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/listeners/"> Listeners </a> 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 2e926dea..03e1dea7 100644 --- a/docs/en/cowboy/2.0/guide/getting_started/index.html +++ b/docs/en/cowboy/2.0/guide/getting_started/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Getting started</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -229,13 +229,13 @@ in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/introduction/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/introduction/"> Introduction </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/flow_diagram/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/flow_diagram/"> Flow diagram </a> diff --git a/docs/en/cowboy/2.0/guide/handlers/index.html b/docs/en/cowboy/2.0/guide/handlers/index.html index 5826a1e7..b68527d9 100644 --- a/docs/en/cowboy/2.0/guide/handlers/index.html +++ b/docs/en/cowboy/2.0/guide/handlers/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Handlers</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -174,13 +174,13 @@ process will terminate soon after this call returns.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/"> Constraints </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/"> Loop handlers </a> diff --git a/docs/en/cowboy/2.0/guide/hooks/index.html b/docs/en/cowboy/2.0/guide/hooks/index.html index 57d5baa6..00cf2d9e 100644 --- a/docs/en/cowboy/2.0/guide/hooks/index.html +++ b/docs/en/cowboy/2.0/guide/hooks/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Hooks</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -121,7 +121,7 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/sub_protocols/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/sub_protocols/"> Sub protocols </a> diff --git a/docs/en/cowboy/2.0/guide/index.html b/docs/en/cowboy/2.0/guide/index.html index d6403441..0d0a92e5 100644 --- a/docs/en/cowboy/2.0/guide/index.html +++ b/docs/en/cowboy/2.0/guide/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Cowboy User Guide</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/guide/introduction.asciidoc b/docs/en/cowboy/2.0/guide/introduction.asciidoc index d262b5ce..c9d042d3 100644 --- a/docs/en/cowboy/2.0/guide/introduction.asciidoc +++ b/docs/en/cowboy/2.0/guide/introduction.asciidoc @@ -1,7 +1,7 @@ [[introduction]] == Introduction -Cowboy is a small, fast and modular HTTP server written in Erlang. +Cowboy is a small, fast and modern HTTP server for Erlang/OTP. Cowboy aims to provide a complete xref:modern_web[modern Web stack]. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and diff --git a/docs/en/cowboy/2.0/guide/introduction/index.html b/docs/en/cowboy/2.0/guide/introduction/index.html index db6f7b44..8aff6c8c 100644 --- a/docs/en/cowboy/2.0/guide/introduction/index.html +++ b/docs/en/cowboy/2.0/guide/introduction/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Introduction</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -69,7 +69,7 @@ <h1 class="lined-header"><span>Introduction</span></h1> -<div class="paragraph"><p>Cowboy is a small, fast and modular HTTP server written in Erlang.</p></div>
+<div class="paragraph"><p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p></div>
<div class="paragraph"><p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>.
This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and
Webmachine-based REST.</p></div>
@@ -151,13 +151,13 @@ when sending responses.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/erlang_web/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/erlang_web/"> Erlang and the Web </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/"> Getting started </a> diff --git a/docs/en/cowboy/2.0/guide/listeners/index.html b/docs/en/cowboy/2.0/guide/listeners/index.html index fa644115..40f1f1a3 100644 --- a/docs/en/cowboy/2.0/guide/listeners/index.html +++ b/docs/en/cowboy/2.0/guide/listeners/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Listeners</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -181,13 +181,13 @@ shared.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/flow_diagram/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/flow_diagram/"> Flow diagram </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/routing/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/routing/"> Routing </a> diff --git a/docs/en/cowboy/2.0/guide/loop_handlers/index.html b/docs/en/cowboy/2.0/guide/loop_handlers/index.html index 15921152..5445f1cf 100644 --- a/docs/en/cowboy/2.0/guide/loop_handlers/index.html +++ b/docs/en/cowboy/2.0/guide/loop_handlers/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Loop handlers</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -220,13 +220,13 @@ accordingly.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/handlers/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/handlers/"> Handlers </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/static_files/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/static_files/"> Static files </a> diff --git a/docs/en/cowboy/2.0/guide/middlewares/index.html b/docs/en/cowboy/2.0/guide/middlewares/index.html index f4dfdb0a..0bf012b3 100644 --- a/docs/en/cowboy/2.0/guide/middlewares/index.html +++ b/docs/en/cowboy/2.0/guide/middlewares/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Middlewares</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -164,13 +164,13 @@ values. It puts the result of the request handling into <code>result</code>.</p> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/broken_clients/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/broken_clients/"> Dealing with broken clients </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/sub_protocols/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/sub_protocols/"> Sub protocols </a> diff --git a/docs/en/cowboy/2.0/guide/modern_web/index.html b/docs/en/cowboy/2.0/guide/modern_web/index.html index bc720d03..7067288b 100644 --- a/docs/en/cowboy/2.0/guide/modern_web/index.html +++ b/docs/en/cowboy/2.0/guide/modern_web/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: The modern Web</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -187,7 +187,7 @@ the HTTP protocol.</p></div> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/erlang_web/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/erlang_web/"> Erlang and the Web </a> diff --git a/docs/en/cowboy/2.0/guide/multipart/index.html b/docs/en/cowboy/2.0/guide/multipart/index.html index f7c9202b..76ab89c1 100644 --- a/docs/en/cowboy/2.0/guide/multipart/index.html +++ b/docs/en/cowboy/2.0/guide/multipart/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Multipart requests</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -241,13 +241,13 @@ reading as soon as you find the data you need.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/"> Using cookies </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_principles/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_principles/"> REST principles </a> diff --git a/docs/en/cowboy/2.0/guide/overview/index.html b/docs/en/cowboy/2.0/guide/overview/index.html index 914ca774..3d40ee48 100644 --- a/docs/en/cowboy/2.0/guide/overview/index.html +++ b/docs/en/cowboy/2.0/guide/overview/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Request overview</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/guide/req/index.html b/docs/en/cowboy/2.0/guide/req/index.html index 42e3c089..5ba6b035 100644 --- a/docs/en/cowboy/2.0/guide/req/index.html +++ b/docs/en/cowboy/2.0/guide/req/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: The Req object</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -480,13 +480,13 @@ client itself. It may also be a proxy or a gateway.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/static_files/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/static_files/"> Static files </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/req_body/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/req_body/"> Reading the request body </a> diff --git a/docs/en/cowboy/2.0/guide/req_body/index.html b/docs/en/cowboy/2.0/guide/req_body/index.html index e9fb8512..139712a1 100644 --- a/docs/en/cowboy/2.0/guide/req_body/index.html +++ b/docs/en/cowboy/2.0/guide/req_body/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Reading the request body</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -216,13 +216,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/req/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/req/"> The Req object </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/resp/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/resp/"> Sending a response </a> diff --git a/docs/en/cowboy/2.0/guide/resource_design/index.html b/docs/en/cowboy/2.0/guide/resource_design/index.html index 23e7719e..bc37e2a4 100644 --- a/docs/en/cowboy/2.0/guide/resource_design/index.html +++ b/docs/en/cowboy/2.0/guide/resource_design/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Designing a resource handler</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -286,13 +286,13 @@ no way of knowing it has been completed yet, implement the <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/"> REST flowcharts </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/"> The Websocket protocol </a> diff --git a/docs/en/cowboy/2.0/guide/resp/index.html b/docs/en/cowboy/2.0/guide/resp/index.html index 9cff5403..6bf3cd8e 100644 --- a/docs/en/cowboy/2.0/guide/resp/index.html +++ b/docs/en/cowboy/2.0/guide/resp/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Sending a response</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -394,13 +394,13 @@ ultimately send a response to the client.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/req_body/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/req_body/"> Reading the request body </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/"> Using cookies </a> diff --git a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html index d76d3b14..77af893e 100644 --- a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html +++ b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: REST flowcharts</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -316,13 +316,13 @@ the results for subsequent use.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/"> REST handlers </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/"> Designing a resource handler </a> diff --git a/docs/en/cowboy/2.0/guide/rest_handlers/index.html b/docs/en/cowboy/2.0/guide/rest_handlers/index.html index 3caf83e0..2f656c70 100644 --- a/docs/en/cowboy/2.0/guide/rest_handlers/index.html +++ b/docs/en/cowboy/2.0/guide/rest_handlers/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: REST handlers</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -355,13 +355,13 @@ cellspacing="0" cellpadding="4"> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_principles/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_principles/"> REST principles </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/"> REST flowcharts </a> diff --git a/docs/en/cowboy/2.0/guide/rest_principles/index.html b/docs/en/cowboy/2.0/guide/rest_principles/index.html index 2e3ad8c1..a78b08ef 100644 --- a/docs/en/cowboy/2.0/guide/rest_principles/index.html +++ b/docs/en/cowboy/2.0/guide/rest_principles/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: REST principles</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -225,13 +225,13 @@ anything specific to the service to operate on it.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/"> Multipart requests </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/"> REST handlers </a> diff --git a/docs/en/cowboy/2.0/guide/routing/index.html b/docs/en/cowboy/2.0/guide/routing/index.html index 9a04e323..ab7fe6a7 100644 --- a/docs/en/cowboy/2.0/guide/routing/index.html +++ b/docs/en/cowboy/2.0/guide/routing/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Routing</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -332,13 +332,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/listeners/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/listeners/"> Listeners </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/"> Constraints </a> diff --git a/docs/en/cowboy/2.0/guide/static_files/index.html b/docs/en/cowboy/2.0/guide/static_files/index.html index ff1c78dc..49a93eff 100644 --- a/docs/en/cowboy/2.0/guide/static_files/index.html +++ b/docs/en/cowboy/2.0/guide/static_files/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Static files</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -245,13 +245,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/"> Loop handlers </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/req/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/req/"> The Req object </a> diff --git a/docs/en/cowboy/2.0/guide/sub_protocols/index.html b/docs/en/cowboy/2.0/guide/sub_protocols/index.html index c8c7fbb3..d2437876 100644 --- a/docs/en/cowboy/2.0/guide/sub_protocols/index.html +++ b/docs/en/cowboy/2.0/guide/sub_protocols/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Sub protocols</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -142,13 +142,13 @@ the optional <code>terminate/3</code> callback is called, if present.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/middlewares/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/middlewares/"> Middlewares </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/hooks/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/hooks/"> Hooks </a> diff --git a/docs/en/cowboy/2.0/guide/ws_handlers/index.html b/docs/en/cowboy/2.0/guide/ws_handlers/index.html index adcdc3e4..b8bf8d33 100644 --- a/docs/en/cowboy/2.0/guide/ws_handlers/index.html +++ b/docs/en/cowboy/2.0/guide/ws_handlers/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Websocket handlers</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -341,13 +341,13 @@ close frame will not be sent.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/"> The Websocket protocol </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/architecture/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/architecture/"> Architecture </a> diff --git a/docs/en/cowboy/2.0/guide/ws_protocol/index.html b/docs/en/cowboy/2.0/guide/ws_protocol/index.html index 17d873d1..8d4d35e9 100644 --- a/docs/en/cowboy/2.0/guide/ws_protocol/index.html +++ b/docs/en/cowboy/2.0/guide/ws_protocol/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: The Websocket protocol</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -143,13 +143,13 @@ the listener.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/"> + <a style="float:left" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/"> Designing a resource handler </a> - <a style="float:right" href="http://ninenines.eu/docs/en/cowboy/2.0/guide/ws_handlers/"> + <a style="float:right" href="https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_handlers/"> Websocket handlers </a> diff --git a/docs/en/cowboy/2.0/index.html b/docs/en/cowboy/2.0/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/cowboy/2.0/index.html +++ b/docs/en/cowboy/2.0/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html b/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html new file mode 100644 index 00000000..bce57e3c --- /dev/null +++ b/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html @@ -0,0 +1,255 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> + + <meta name="generator" content="Hugo 0.16" /> + + <title>Nine Nines: cowboy:set_env(3)</title> + + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + + <link href="/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/99s.css" rel="stylesheet"> + + <link rel="shortcut icon" href="/img/ico/favicon.ico"> + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png"> + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png"> + <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png"> + + +</head> + + +<body class=""> + <header id="page-head"> + <div id="topbar" class="container"> + <div class="row"> + <div class="span2"> + <h1 id="logo"><a href="/" title="99s">99s</a></h1> + </div> + <div class="span10"> + + <div id="side-header"> + <nav> + <ul> + <li><a title="Hear my thoughts" href="/articles">Articles</a></li> + <li><a title="Watch my talks" href="/talks">Talks</a></li> + <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li> + <li><a title="Request my services" href="/services">Consulting & Training</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li> + <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a> + </li> + <li> + <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a> + </li> + </ul> + </div> + </div> + </div> + </div> + + +</header> + +<div id="contents" class="two_col"> +<div class="container"> +<div class="row"> +<div id="docs" class="span9 maincol"> + +<h1 class="lined-header"><span>cowboy:set_env(3)</span></h1> + +<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy:set_env - Update a listener’s environment value</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">set_env</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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
+ <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
+ <span style="color: #990000">-></span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
+<div class="paragraph"><p>Set or update an environment value for a previously started
+listener.</p></div>
+<div class="paragraph"><p>This is most useful for updating the routes dynamically,
+without having to restart the listener.</p></div>
+<div class="paragraph"><p>The new value will only be available to new connections.
+Pre-existing connections will still use the old value.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name
+</dt>
+<dd>
+<p>
+The name of the listener to update.
+</p>
+<div class="paragraph"><p>The name of the listener is the first argument given to the
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
+<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+</dd>
+<dt class="hdlist1">
+Key
+</dt>
+<dd>
+<p>
+The key in the environment map. Common keys include <code>dispatch</code>
+and <code>middlewares</code>.
+</p>
+</dd>
+<dt class="hdlist1">
+Value
+</dt>
+<dd>
+<p>
+The new value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
+<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
+not exist.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Update a listener’s routes</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><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">toppage_h</span>, []},
+ {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+ ]}
+]),
+
+<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
+<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
+</div>
+</div>
+ + + + + +</div> + +<div class="span3 sidecol"> + + +<h3> + Cowboy + 2.0 + Function Reference + +</h3> + +<ul> + + <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li> + + + <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li> + + +</ul> + +<h4 id="docs-nav">Navigation</h4> + +<h4>Version select</h4> +<ul> + + + + <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li> + + <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li> + +</ul> + +</div> +</div> +</div> +</div> + + <footer> + <div class="container"> + <div class="row"> + <div class="span6"> + <p id="scroll-top"><a href="#">↑ Scroll to top</a></p> + <nav> + <ul> + <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li> + </ul> + </nav> + </div> + <div class="span6 credits"> + <p><img src="/img/footer_logo.png"></p> + <p>Copyright © Loïc Hoguin 2012-2016</p> + </div> + </div> + </div> + </footer> + + + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> + <script src="/js/bootstrap-carousel.js"></script> + <script src="/js/bootstrap-dropdown.js"></script> + <script src="/js/custom.js"></script> + </body> +</html> + + 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 new file mode 100644 index 00000000..74ace743 --- /dev/null +++ b/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html @@ -0,0 +1,307 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> + + <meta name="generator" content="Hugo 0.16" /> + + <title>Nine Nines: cowboy:start_clear(3)</title> + + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + + <link href="/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/99s.css" rel="stylesheet"> + + <link rel="shortcut icon" href="/img/ico/favicon.ico"> + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png"> + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png"> + <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png"> + + +</head> + + +<body class=""> + <header id="page-head"> + <div id="topbar" class="container"> + <div class="row"> + <div class="span2"> + <h1 id="logo"><a href="/" title="99s">99s</a></h1> + </div> + <div class="span10"> + + <div id="side-header"> + <nav> + <ul> + <li><a title="Hear my thoughts" href="/articles">Articles</a></li> + <li><a title="Watch my talks" href="/talks">Talks</a></li> + <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li> + <li><a title="Request my services" href="/services">Consulting & Training</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li> + <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a> + </li> + <li> + <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a> + </li> + </ul> + </div> + </div> + </div> + </div> + + +</header> + +<div id="contents" class="two_col"> +<div class="container"> +<div class="row"> +<div id="docs" class="span9 maincol"> + +<h1 class="lined-header"><span>cowboy:start_clear(3)</span></h1> + +<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">-></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>()}
+ | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
+<div class="paragraph"><p>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.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name
+</dt>
+<dd>
+<p>
+The listener name is used to refer to this listener in
+future calls, for example when stopping it or when
+updating the routes defined.
+</p>
+<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
+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’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>
+<p>
+The transport options are where the TCP options, including
+the listener’s port number, are defined. Transport options
+are provided as a list of keys and values, for example
+<code>[{port, 8080}]</code>.
+</p>
+<div class="paragraph"><p>The available options are documented in the
+<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
+</dd>
+<dt class="hdlist1">
+ProtocolOpts
+</dt>
+<dd>
+<p>
+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.
+</p>
+<div class="paragraph"><p>The HTTP/1.1 options are documented in the
+<a href="../cowboy_http">cowboy_http(3)</a> manual;
+the HTTP/2 options in
+<a href="../cowboy_http">cowboy_http2(3)</a>;
+and the Websocket options in
+<a href="../cowboy_websocket">cowboy_websocket(3)</a>.</p></div>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
+the top-level supervisor for the listener.</p></div>
+<div class="paragraph"><p>An error tuple is returned on error. The error reason may
+be any Erlang term.</p></div>
+<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
+configured for Cowboy is already in use.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: HTTP/2 support added.
+</p>
+</li>
+<li>
+<p>
+<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Start a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><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">toppage_h</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: #993399">100</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
+ <span style="color: #0000FF">env</span> <span style="color: #990000">=></span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=></span> <span style="color: #009900">Dispatch</span>}
+})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Start a listener on a random port</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+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: #0000FF">env</span> <span style="color: #990000">=></span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=></span> <span style="color: #009900">Dispatch</span>}
+}),
+
+<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
+<a href="../ranch">ranch(3)</a></p></div>
+</div>
+</div>
+ + + + + +</div> + +<div class="span3 sidecol"> + + +<h3> + Cowboy + 2.0 + Function Reference + +</h3> + +<ul> + + <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li> + + + <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li> + + +</ul> + +<h4 id="docs-nav">Navigation</h4> + +<h4>Version select</h4> +<ul> + + + + <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li> + + <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li> + +</ul> + +</div> +</div> +</div> +</div> + + <footer> + <div class="container"> + <div class="row"> + <div class="span6"> + <p id="scroll-top"><a href="#">↑ Scroll to top</a></p> + <nav> + <ul> + <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li> + </ul> + </nav> + </div> + <div class="span6 credits"> + <p><img src="/img/footer_logo.png"></p> + <p>Copyright © Loïc Hoguin 2012-2016</p> + </div> + </div> + </div> + </footer> + + + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> + <script src="/js/bootstrap-carousel.js"></script> + <script src="/js/bootstrap-dropdown.js"></script> + <script src="/js/custom.js"></script> + </body> +</html> + + 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 new file mode 100644 index 00000000..87ed2b83 --- /dev/null +++ b/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html @@ -0,0 +1,312 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> + + <meta name="generator" content="Hugo 0.16" /> + + <title>Nine Nines: cowboy:start_tls(3)</title> + + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + + <link href="/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/99s.css" rel="stylesheet"> + + <link rel="shortcut icon" href="/img/ico/favicon.ico"> + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png"> + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png"> + <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png"> + + +</head> + + +<body class=""> + <header id="page-head"> + <div id="topbar" class="container"> + <div class="row"> + <div class="span2"> + <h1 id="logo"><a href="/" title="99s">99s</a></h1> + </div> + <div class="span10"> + + <div id="side-header"> + <nav> + <ul> + <li><a title="Hear my thoughts" href="/articles">Articles</a></li> + <li><a title="Watch my talks" href="/talks">Talks</a></li> + <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li> + <li><a title="Request my services" href="/services">Consulting & Training</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li> + <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a> + </li> + <li> + <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a> + </li> + </ul> + </div> + </div> + </div> + </div> + + +</header> + +<div id="contents" class="two_col"> +<div class="container"> +<div class="row"> +<div id="docs" class="span9 maincol"> + +<h1 class="lined-header"><span>cowboy:start_tls(3)</span></h1> + +<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">-></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>()}
+ | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
+<div class="paragraph"><p>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.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name
+</dt>
+<dd>
+<p>
+The listener name is used to refer to this listener in
+future calls, for example when stopping it or when
+updating the routes defined.
+</p>
+<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
+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’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>
+<p>
+The transport options are where the TCP options, including
+the listener’s port number, are defined. They also contain
+the TLS options, like the server’s certificate. Transport options
+are provided as a list of keys and values, for example
+<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
+</p>
+<div class="paragraph"><p>The available options are documented in the
+<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
+</dd>
+<dt class="hdlist1">
+ProtocolOpts
+</dt>
+<dd>
+<p>
+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.
+</p>
+<div class="paragraph"><p>The HTTP/1.1 options are documented in the
+<a href="../cowboy_http">cowboy_http(3)</a> manual;
+the HTTP/2 options in
+<a href="../cowboy_http">cowboy_http2(3)</a>;
+and the Websocket options in
+<a href="../cowboy_websocket">cowboy_websocket(3)</a>.</p></div>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
+the top-level supervisor for the listener.</p></div>
+<div class="paragraph"><p>An error tuple is returned on error. The error reason may
+be any Erlang term.</p></div>
+<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
+configured for Cowboy is already in use.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: HTTP/2 support added.
+</p>
+</li>
+<li>
+<p>
+<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Start a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><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">toppage_h</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: #993399">100</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>}
+], #{
+ <span style="color: #0000FF">env</span> <span style="color: #990000">=></span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=></span> <span style="color: #009900">Dispatch</span>}
+})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Start a listener on a random port</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+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">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+], #{
+ <span style="color: #0000FF">env</span> <span style="color: #990000">=></span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=></span> <span style="color: #009900">Dispatch</span>}
+}),
+
+<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../ranch">ranch(3)</a></p></div>
+</div>
+</div>
+ + + + + +</div> + +<div class="span3 sidecol"> + + +<h3> + Cowboy + 2.0 + Function Reference + +</h3> + +<ul> + + <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li> + + + <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li> + + +</ul> + +<h4 id="docs-nav">Navigation</h4> + +<h4>Version select</h4> +<ul> + + + + <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li> + + <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li> + +</ul> + +</div> +</div> +</div> +</div> + + <footer> + <div class="container"> + <div class="row"> + <div class="span6"> + <p id="scroll-top"><a href="#">↑ Scroll to top</a></p> + <nav> + <ul> + <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li> + </ul> + </nav> + </div> + <div class="span6 credits"> + <p><img src="/img/footer_logo.png"></p> + <p>Copyright © Loïc Hoguin 2012-2016</p> + </div> + </div> + </div> + </footer> + + + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> + <script src="/js/bootstrap-carousel.js"></script> + <script src="/js/bootstrap-dropdown.js"></script> + <script src="/js/custom.js"></script> + </body> +</html> + + diff --git a/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html b/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html new file mode 100644 index 00000000..832f9362 --- /dev/null +++ b/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html @@ -0,0 +1,225 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> + + <meta name="generator" content="Hugo 0.16" /> + + <title>Nine Nines: cowboy:stop_listener(3)</title> + + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + + <link href="/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/99s.css" rel="stylesheet"> + + <link rel="shortcut icon" href="/img/ico/favicon.ico"> + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png"> + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png"> + <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png"> + + +</head> + + +<body class=""> + <header id="page-head"> + <div id="topbar" class="container"> + <div class="row"> + <div class="span2"> + <h1 id="logo"><a href="/" title="99s">99s</a></h1> + </div> + <div class="span10"> + + <div id="side-header"> + <nav> + <ul> + <li><a title="Hear my thoughts" href="/articles">Articles</a></li> + <li><a title="Watch my talks" href="/talks">Talks</a></li> + <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li> + <li><a title="Request my services" href="/services">Consulting & Training</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li> + <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a> + </li> + <li> + <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a> + </li> + </ul> + </div> + </div> + </div> + </div> + + +</header> + +<div id="contents" class="two_col"> +<div class="container"> +<div class="row"> +<div id="docs" class="span9 maincol"> + +<h1 class="lined-header"><span>cowboy:stop_listener(3)</span></h1> + +<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">stop_listener</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: #990000">-></span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Stop a previously started listener.</p></div>
+<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name
+</dt>
+<dd>
+<p>
+The name of the listener to be stopped.
+</p>
+<div class="paragraph"><p>The name of the listener is the first argument given to the
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
+<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
+<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
+does not exist.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Stop a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
+<a href="../ranch">ranch(3)</a>,
+<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
+</div>
+</div>
+ + + + + +</div> + +<div class="span3 sidecol"> + + +<h3> + Cowboy + 2.0 + Function Reference + +</h3> + +<ul> + + <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li> + + + <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li> + + +</ul> + +<h4 id="docs-nav">Navigation</h4> + +<h4>Version select</h4> +<ul> + + + + <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li> + + <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li> + +</ul> + +</div> +</div> +</div> +</div> + + <footer> + <div class="container"> + <div class="row"> + <div class="span6"> + <p id="scroll-top"><a href="#">↑ Scroll to top</a></p> + <nav> + <ul> + <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li> + </ul> + </nav> + </div> + <div class="span6 credits"> + <p><img src="/img/footer_logo.png"></p> + <p>Copyright © Loïc Hoguin 2012-2016</p> + </div> + </div> + </div> + </footer> + + + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> + <script src="/js/bootstrap-carousel.js"></script> + <script src="/js/bootstrap-dropdown.js"></script> + <script src="/js/custom.js"></script> + </body> +</html> + + diff --git a/docs/en/cowboy/2.0/manual/cowboy/index.html b/docs/en/cowboy/2.0/manual/cowboy/index.html index 6763940e..19271913 100644 --- a/docs/en/cowboy/2.0/manual/cowboy/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -83,176 +83,116 @@ manipulating Ranch listeners.</p></div> </div>
</div>
<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener’s environment value
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_types">Types</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_fields_field">fields() = [Field]</h3>
+<h3 id="_fields">fields()</h3>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">Field</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
- | {<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>() | [<span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()]}
- | {<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>() | [<span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()], <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Fields for match operations. Constraint(s) and default value are optional.</p></div>
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
+ | {<span style="color: #009900">Name</span>, <span style="color: #009900">Constraints</span>}
+ | {<span style="color: #009900">Name</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Default</span>}]
+
+<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
+<span style="color: #009900">Constraints</span> <span style="color: #990000">::</span> <span style="color: #009900">Constraint</span> | [<span style="color: #009900">Constraint</span>]
+<span style="color: #009900">Constraint</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()
+<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Fields description for match operations.</p></div>
+<div class="paragraph"><p>This type is used in <a href="../cowboy_router">cowboy_router</a>
+for matching bindings and in the match functions found in
+<a href="../cowboy_req">cowboy_req</a>.</p></div>
</div>
<div class="sect2">
-<h3 id="_http_headers_binary_iodata">http_headers() = [{binary(), iodata()}]</h3>
-<div class="paragraph"><p>HTTP headers as a list of key/values.</p></div>
+<h3 id="_http_headers">http_headers()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">http_headers</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() <span style="color: #990000">=></span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>HTTP headers.</p></div>
</div>
<div class="sect2">
-<h3 id="_http_status_non_neg_integer_binary">http_status() = non_neg_integer() | binary()</h3>
-<div class="paragraph"><p>HTTP status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a custom message.</p></div>
+<h3 id="_http_status">http_status()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>HTTP response status.</p></div>
+<div class="paragraph"><p>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.</p></div>
</div>
<div class="sect2">
-<h3 id="_http_version_http_1_1_http_1_0">http_version() = 'HTTP/1.1' | 'HTTP/1.0'</h3>
+<h3 id="_http_version">http_version()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
<div class="paragraph"><p>HTTP version.</p></div>
+<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
</div>
<div class="sect2">
-<h3 id="_code_onresponse_fun_fun_http_status_http_headers_iodata_cowboy_req_req_gt_cowboy_req_req_code"><code>onresponse_fun() = fun((http_status(), http_headers(), iodata(), cowboy_req:req()) -> cowboy_req:req())</code></h3>
-<div class="paragraph"><p>Fun called immediately before sending the response.</p></div>
-<div class="paragraph"><p>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.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_start_http_ref_nbacceptors_transopts_protoopts_8594_ok_pid">start_http(Ref, NbAcceptors, TransOpts, ProtoOpts) → {ok, pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = ranch_tcp:opts()
-</dt>
-<dd>
-<p>
-TCP transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = cowboy_protocol:opts()
-</dt>
-<dd>
-<p>
-HTTP protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for HTTP connections. Returns the pid for this
-listener’s supervisor.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_start_https_ref_nbacceptors_transopts_protoopts_8594_ok_pid">start_https(Ref, NbAcceptors, TransOpts, ProtoOpts) → {ok, pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = ranch_ssl:opts()
-</dt>
-<dd>
-<p>
-SSL transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = cowboy_protocol:opts()
-</dt>
-<dd>
-<p>
-HTTP protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for HTTPS connections. Returns the pid for this
-listener’s supervisor.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) → ok | {error, not_found}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_env_ref_name_value_8594_ok">set_env(Ref, Name, Value) → ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Name of environment value.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
-<p>
-Environment value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set or update an environment value for an already running listener.
-This will take effect on all subsequent connections.</p></div>
+<h3 id="_opts">opts()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
+<div class="paragraph"><p>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.</p></div>
+<div class="paragraph"><p>The HTTP/1.1 options are documented in the
+<a href="../cowboy_http">cowboy_http(3)</a> manual;
+the HTTP/2 options in
+<a href="../cowboy_http">cowboy_http2(3)</a>;
+and the Websocket options in
+<a href="../cowboy_websocket">cowboy_websocket(3)</a>.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">See also</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <a href="http://ninenines.eu/docs/en/ranch/HEAD/guide">Ranch guide</a>
-provides detailed information about how listeners work.</p></div>
+<div class="paragraph"><p><a href="../cowboy_app">cowboy(7)</a>,
+<a href="../ranch">ranch(3)</a></p></div>
</div>
</div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy_app/index.html b/docs/en/cowboy/2.0/manual/cowboy_app/index.html index f8d0c139..a251adc8 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_app/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_app/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy(7)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -72,23 +72,152 @@ <div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modular HTTP server.</p></div>
+<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
+HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
+<div class="paragraph"><p>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.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_modules">Modules</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Functions:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy">cowboy(3)</a> - Listener management
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_router">cowboy_router(3)</a> - Router
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Protocols:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_http">cowboy_http2(3)</a> - HTTP/2
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Handlers:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Behaviors:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_sub_protocol">cowboy_sub_protocol(3)</a> - Sub protocols
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Middlewares:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
+</p>
+</li>
+</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_dependencies">Dependencies</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application uses the Erlang applications <code>ranch</code>
-for listening and accepting TCP connections, <code>crypto</code> for
-establishing Websocket connections, and <code>cowlib</code> for parsing and
-building messages for Web protocols. These dependencies must
-be loaded for the <code>cowboy</code> application to work. In an embedded
-environment this means that they need to be started with the
-<code>application:start/{1,2}</code> function before the <code>cowboy</code>
-application is started.</p></div>
-<div class="paragraph"><p>The <code>cowboy</code> application also uses the Erlang applications
-<code>asn1</code>, <code>public_key</code> and <code>ssl</code> when listening for HTTPS connections.
-These are started automatically if they weren’t before.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
+</p>
+</li>
+<li>
+<p>
+<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
+</p>
+</li>
+<li>
+<p>
+ssl - Secure communication over sockets
+</p>
+</li>
+<li>
+<p>
+crypto - Crypto functions
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
+application. To start Cowboy and all dependencies at once:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<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">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
</div>
</div>
<div class="sect1">
@@ -98,6 +227,13 @@ These are started automatically if they weren’t before.</p></div> environment configuration parameters.</p></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
+<a href="../cowlib">cowlib(7)</a></p></div>
+</div>
+</div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy_handler/index.html b/docs/en/cowboy/2.0/manual/cowboy_handler/index.html index 8130d474..ba64c876 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_handler/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_handler/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_handler(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_loop/index.html b/docs/en/cowboy/2.0/manual/cowboy_loop/index.html index 70f6c9c1..df16397a 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_loop/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_loop/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_loop(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html index acfcb743..20e6731c 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_middleware(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html b/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html index de8730ae..bfe03a1f 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_protocol(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_req/index.html b/docs/en/cowboy/2.0/manual/cowboy_req/index.html index bda581ba..d895d890 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_req/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_req/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_req(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_rest/index.html b/docs/en/cowboy/2.0/manual/cowboy_rest/index.html index dcb46749..12ed4c05 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_rest/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_rest/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_rest(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_router/index.html b/docs/en/cowboy/2.0/manual/cowboy_router/index.html index 45abf974..850d81a0 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_router/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_router/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_router(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_static/index.html b/docs/en/cowboy/2.0/manual/cowboy_static/index.html index 9a4727e5..0b4ad099 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_static/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_static/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_static(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html b/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html index 65397642..b897cac4 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_sub_protocol(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> 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 d8cd3e46..5802a5d8 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: cowboy_websocket(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/http_status_codes/index.html b/docs/en/cowboy/2.0/manual/http_status_codes/index.html index eaa74f9f..d2f7ac55 100644 --- a/docs/en/cowboy/2.0/manual/http_status_codes/index.html +++ b/docs/en/cowboy/2.0/manual/http_status_codes/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: HTTP status codes(7)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/cowboy/2.0/manual/index.html b/docs/en/cowboy/2.0/manual/index.html index 0fb488bf..e1b3dbe4 100644 --- a/docs/en/cowboy/2.0/manual/index.html +++ b/docs/en/cowboy/2.0/manual/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Cowboy Function Reference</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -117,11 +117,31 @@ </li>
<li>
<p>
+<a href="cowboy.set_env">cowboy:set_env(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy.start_clear">cowboy:start_clear(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy.start_tls">cowboy:start_tls(3)</a>
+</p>
+</li>
+<li>
+<p>
<a href="cowboy_static">cowboy_static(3)</a>
</p>
</li>
<li>
<p>
+<a href="cowboy.stop_listener">cowboy:stop_listener(3)</a>
+</p>
+</li>
+<li>
+<p>
<a href="cowboy_sub_protocol">cowboy_sub_protocol(3)</a>
</p>
</li>
diff --git a/docs/en/cowboy/HEAD/guide/index.html b/docs/en/cowboy/HEAD/guide/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/cowboy/HEAD/guide/index.html +++ b/docs/en/cowboy/HEAD/guide/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/cowboy/HEAD/index.html b/docs/en/cowboy/HEAD/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/cowboy/HEAD/index.html +++ b/docs/en/cowboy/HEAD/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/cowboy/HEAD/manual/index.html b/docs/en/cowboy/HEAD/manual/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/cowboy/HEAD/manual/index.html +++ b/docs/en/cowboy/HEAD/manual/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/cowboy/index.html b/docs/en/cowboy/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/cowboy/index.html +++ b/docs/en/cowboy/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/erlang.mk/1/guide/app/index.html b/docs/en/erlang.mk/1/guide/app/index.html index bd03460c..41721c9d 100644 --- a/docs/en/erlang.mk/1/guide/app/index.html +++ b/docs/en/erlang.mk/1/guide/app/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Building</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -593,13 +593,13 @@ you don’t explicitly use it.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/"> Limitations </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/deps/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/deps/"> Packages and dependencies </a> diff --git a/docs/en/erlang.mk/1/guide/asciidoc/index.html b/docs/en/erlang.mk/1/guide/asciidoc/index.html index ffabf5c2..98f19d51 100644 --- a/docs/en/erlang.mk/1/guide/asciidoc/index.html +++ b/docs/en/erlang.mk/1/guide/asciidoc/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: AsciiDoc documentation</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -172,13 +172,13 @@ your user.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/compat/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/compat/"> Compatibility with other build tools </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/"> EDoc comments </a> diff --git a/docs/en/erlang.mk/1/guide/ci/index.html b/docs/en/erlang.mk/1/guide/ci/index.html index a3af05ed..5f1fc30c 100644 --- a/docs/en/erlang.mk/1/guide/ci/index.html +++ b/docs/en/erlang.mk/1/guide/ci/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Continuous integration</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -79,13 +79,13 @@ <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/"> Code coverage </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/"> Dialyzer </a> diff --git a/docs/en/erlang.mk/1/guide/common_test/index.html b/docs/en/erlang.mk/1/guide/common_test/index.html index 84ce7490..56de0f4c 100644 --- a/docs/en/erlang.mk/1/guide/common_test/index.html +++ b/docs/en/erlang.mk/1/guide/common_test/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Common Test</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -183,13 +183,13 @@ but covered in its own chapter.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/"> EUnit </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/"> Code coverage </a> diff --git a/docs/en/erlang.mk/1/guide/compat/index.html b/docs/en/erlang.mk/1/guide/compat/index.html index a76ca857..c46daeff 100644 --- a/docs/en/erlang.mk/1/guide/compat/index.html +++ b/docs/en/erlang.mk/1/guide/compat/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Compatibility with other build tools</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -158,13 +158,13 @@ configuration, add or remove modules.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/"> Escripts </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/"> AsciiDoc documentation </a> diff --git a/docs/en/erlang.mk/1/guide/contributing/index.html b/docs/en/erlang.mk/1/guide/contributing/index.html index c05cd4f4..f735cbc6 100644 --- a/docs/en/erlang.mk/1/guide/contributing/index.html +++ b/docs/en/erlang.mk/1/guide/contributing/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Contributing</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -203,7 +203,7 @@ the related documentation.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/history/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/history/"> Short history </a> diff --git a/docs/en/erlang.mk/1/guide/coverage/index.html b/docs/en/erlang.mk/1/guide/coverage/index.html index f6a0a2be..440f7abf 100644 --- a/docs/en/erlang.mk/1/guide/coverage/index.html +++ b/docs/en/erlang.mk/1/guide/coverage/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Code coverage</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -79,13 +79,13 @@ <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/"> Common Test </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/ci/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/ci/"> Continuous integration </a> diff --git a/docs/en/erlang.mk/1/guide/deps/index.html b/docs/en/erlang.mk/1/guide/deps/index.html index 68554d8e..021c4574 100644 --- a/docs/en/erlang.mk/1/guide/deps/index.html +++ b/docs/en/erlang.mk/1/guide/deps/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Packages and dependencies</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -606,13 +606,13 @@ The dependency directory <em>$(DEPS_DIR)</em> will not be removed on <code>make <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/app/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/app/"> Building </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/ports/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/ports/"> NIFs and port drivers </a> diff --git a/docs/en/erlang.mk/1/guide/dialyzer/index.html b/docs/en/erlang.mk/1/guide/dialyzer/index.html index a052abc5..454d176e 100644 --- a/docs/en/erlang.mk/1/guide/dialyzer/index.html +++ b/docs/en/erlang.mk/1/guide/dialyzer/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Dialyzer</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -149,13 +149,13 @@ Dialyzer creates it automatically.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/ci/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/ci/"> Continuous integration </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/xref/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/xref/"> Xref </a> diff --git a/docs/en/erlang.mk/1/guide/edoc/index.html b/docs/en/erlang.mk/1/guide/edoc/index.html index 372b65ed..6e8ed6f8 100644 --- a/docs/en/erlang.mk/1/guide/edoc/index.html +++ b/docs/en/erlang.mk/1/guide/edoc/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: EDoc comments</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -126,13 +126,13 @@ the following to your Makefile:</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/"> AsciiDoc documentation </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/shell/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/shell/"> Erlang shell </a> diff --git a/docs/en/erlang.mk/1/guide/escripts/index.html b/docs/en/erlang.mk/1/guide/escripts/index.html index a8e8cf9a..dec55786 100644 --- a/docs/en/erlang.mk/1/guide/escripts/index.html +++ b/docs/en/erlang.mk/1/guide/escripts/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Escripts</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -79,13 +79,13 @@ <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/releases/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/releases/"> Releases </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/compat/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/compat/"> Compatibility with other build tools </a> diff --git a/docs/en/erlang.mk/1/guide/eunit/index.html b/docs/en/erlang.mk/1/guide/eunit/index.html index f7be4f02..f0a9f4d4 100644 --- a/docs/en/erlang.mk/1/guide/eunit/index.html +++ b/docs/en/erlang.mk/1/guide/eunit/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: EUnit</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -213,13 +213,13 @@ but covered in its own chapter.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/shell/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/shell/"> Erlang shell </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/"> Common Test </a> diff --git a/docs/en/erlang.mk/1/guide/external_plugins/index.html b/docs/en/erlang.mk/1/guide/external_plugins/index.html index 6659e956..735e4820 100644 --- a/docs/en/erlang.mk/1/guide/external_plugins/index.html +++ b/docs/en/erlang.mk/1/guide/external_plugins/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: External plugins</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -141,13 +141,13 @@ in one go if they wish to do so.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/xref/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/xref/"> Xref </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/"> List of plugins </a> diff --git a/docs/en/erlang.mk/1/guide/external_plugins_list/index.html b/docs/en/erlang.mk/1/guide/external_plugins_list/index.html index 174cf051..803e63b5 100644 --- a/docs/en/erlang.mk/1/guide/external_plugins_list/index.html +++ b/docs/en/erlang.mk/1/guide/external_plugins_list/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: List of plugins</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -152,13 +152,13 @@ to generate a compatible configuration file for <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/"> External plugins </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/why/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/why/"> Why Erlang.mk </a> diff --git a/docs/en/erlang.mk/1/guide/getting_started/index.html b/docs/en/erlang.mk/1/guide/getting_started/index.html index c95ebf73..0504e949 100644 --- a/docs/en/erlang.mk/1/guide/getting_started/index.html +++ b/docs/en/erlang.mk/1/guide/getting_started/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Getting started</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -430,13 +430,13 @@ Loïc Hoguin by sending an email to <a href="mailto:[email protected]">contac <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/installation/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/installation/"> Installation </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/overview/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/overview/"> Overview </a> diff --git a/docs/en/erlang.mk/1/guide/history/index.html b/docs/en/erlang.mk/1/guide/history/index.html index 0bdd1c94..37125ee4 100644 --- a/docs/en/erlang.mk/1/guide/history/index.html +++ b/docs/en/erlang.mk/1/guide/history/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Short history</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -133,13 +133,13 @@ from the 3.6.0 release onward.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/why/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/why/"> Why Erlang.mk </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/contributing/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/contributing/"> Contributing </a> diff --git a/docs/en/erlang.mk/1/guide/index.html b/docs/en/erlang.mk/1/guide/index.html index 7c820944..66b34a72 100644 --- a/docs/en/erlang.mk/1/guide/index.html +++ b/docs/en/erlang.mk/1/guide/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Erlang.mk User Guide</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/erlang.mk/1/guide/installation/index.html b/docs/en/erlang.mk/1/guide/installation/index.html index 066b4a4e..7e4ebfb8 100644 --- a/docs/en/erlang.mk/1/guide/installation/index.html +++ b/docs/en/erlang.mk/1/guide/installation/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Installation</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -200,7 +200,7 @@ so expect bugs to be fixed as more tests are added.</p></div> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/getting_started/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/getting_started/"> Getting started </a> diff --git a/docs/en/erlang.mk/1/guide/limitations/index.html b/docs/en/erlang.mk/1/guide/limitations/index.html index 0ee214d8..8b88d8ae 100644 --- a/docs/en/erlang.mk/1/guide/limitations/index.html +++ b/docs/en/erlang.mk/1/guide/limitations/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Limitations</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -121,13 +121,13 @@ fix this behavior.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/updating/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/updating/"> Updating Erlang.mk </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/app/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/app/"> Building </a> diff --git a/docs/en/erlang.mk/1/guide/overview/index.html b/docs/en/erlang.mk/1/guide/overview/index.html index a06ba5c3..8c838898 100644 --- a/docs/en/erlang.mk/1/guide/overview/index.html +++ b/docs/en/erlang.mk/1/guide/overview/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Overview</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -166,13 +166,13 @@ everyone agreed on everything all the time.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/getting_started/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/getting_started/"> Getting started </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/updating/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/updating/"> Updating Erlang.mk </a> diff --git a/docs/en/erlang.mk/1/guide/ports/index.html b/docs/en/erlang.mk/1/guide/ports/index.html index 737ed021..83ad5dd4 100644 --- a/docs/en/erlang.mk/1/guide/ports/index.html +++ b/docs/en/erlang.mk/1/guide/ports/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: NIFs and port drivers</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -214,13 +214,13 @@ list the files to compile.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/deps/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/deps/"> Packages and dependencies </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/releases/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/releases/"> Releases </a> diff --git a/docs/en/erlang.mk/1/guide/releases/index.html b/docs/en/erlang.mk/1/guide/releases/index.html index a0946acd..bf102a3c 100644 --- a/docs/en/erlang.mk/1/guide/releases/index.html +++ b/docs/en/erlang.mk/1/guide/releases/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Releases</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -151,13 +151,13 @@ use to check things as needed.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/ports/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/ports/"> NIFs and port drivers </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/"> Escripts </a> diff --git a/docs/en/erlang.mk/1/guide/shell/index.html b/docs/en/erlang.mk/1/guide/shell/index.html index 3a71c163..2581a699 100644 --- a/docs/en/erlang.mk/1/guide/shell/index.html +++ b/docs/en/erlang.mk/1/guide/shell/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Erlang shell</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -119,13 +119,13 @@ command <code>q().</code>.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/"> EDoc comments </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/"> EUnit </a> diff --git a/docs/en/erlang.mk/1/guide/updating/index.html b/docs/en/erlang.mk/1/guide/updating/index.html index c5ca3957..bf039a6d 100644 --- a/docs/en/erlang.mk/1/guide/updating/index.html +++ b/docs/en/erlang.mk/1/guide/updating/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Updating Erlang.mk</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -140,13 +140,13 @@ the <code>ERLANG_MK_BUILD_DIR</code> variable.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/overview/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/overview/"> Overview </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/"> Limitations </a> diff --git a/docs/en/erlang.mk/1/guide/why/index.html b/docs/en/erlang.mk/1/guide/why/index.html index a90601e8..8619e04a 100644 --- a/docs/en/erlang.mk/1/guide/why/index.html +++ b/docs/en/erlang.mk/1/guide/why/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Why Erlang.mk</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -158,13 +158,13 @@ as you expect it to.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/"> List of plugins </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/history/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/history/"> Short history </a> diff --git a/docs/en/erlang.mk/1/guide/xref/index.html b/docs/en/erlang.mk/1/guide/xref/index.html index 78645d68..a65124a1 100644 --- a/docs/en/erlang.mk/1/guide/xref/index.html +++ b/docs/en/erlang.mk/1/guide/xref/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Xref</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -79,13 +79,13 @@ <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/"> + <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/"> Dialyzer </a> - <a style="float:right" href="http://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/"> + <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/"> External plugins </a> diff --git a/docs/en/erlang.mk/1/index.html b/docs/en/erlang.mk/1/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/erlang.mk/1/index.html +++ b/docs/en/erlang.mk/1/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/erlang.mk/index.html b/docs/en/erlang.mk/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/erlang.mk/index.html +++ b/docs/en/erlang.mk/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/gun/1.0/guide/connect/index.html b/docs/en/gun/1.0/guide/connect/index.html index 415dd438..aeebd80e 100644 --- a/docs/en/gun/1.0/guide/connect/index.html +++ b/docs/en/gun/1.0/guide/connect/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Connection</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -240,13 +240,13 @@ when the connection has been closed.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/gun/1.0/guide/protocols/"> + <a style="float:left" href="https://ninenines.eu/docs/en/gun/1.0/guide/protocols/"> Supported protocols </a> - <a style="float:right" href="http://ninenines.eu/docs/en/gun/1.0/guide/http/"> + <a style="float:right" href="https://ninenines.eu/docs/en/gun/1.0/guide/http/"> HTTP </a> diff --git a/docs/en/gun/1.0/guide/http/index.html b/docs/en/gun/1.0/guide/http/index.html index 662b63fb..fa12b51c 100644 --- a/docs/en/gun/1.0/guide/http/index.html +++ b/docs/en/gun/1.0/guide/http/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: HTTP</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -453,13 +453,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/gun/1.0/guide/connect/"> + <a style="float:left" href="https://ninenines.eu/docs/en/gun/1.0/guide/connect/"> Connection </a> - <a style="float:right" href="http://ninenines.eu/docs/en/gun/1.0/guide/websocket/"> + <a style="float:right" href="https://ninenines.eu/docs/en/gun/1.0/guide/websocket/"> Websocket </a> diff --git a/docs/en/gun/1.0/guide/index.html b/docs/en/gun/1.0/guide/index.html index 3ed5fbdf..127591f6 100644 --- a/docs/en/gun/1.0/guide/index.html +++ b/docs/en/gun/1.0/guide/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Gun User Guide</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/gun/1.0/guide/introduction/index.html b/docs/en/gun/1.0/guide/introduction/index.html index 4af7e8cc..010f7aef 100644 --- a/docs/en/gun/1.0/guide/introduction/index.html +++ b/docs/en/gun/1.0/guide/introduction/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Introduction</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -108,7 +108,7 @@ names.</p></div> - <a style="float:right" href="http://ninenines.eu/docs/en/gun/1.0/guide/start/"> + <a style="float:right" href="https://ninenines.eu/docs/en/gun/1.0/guide/start/"> Starting and stopping </a> diff --git a/docs/en/gun/1.0/guide/protocols/index.html b/docs/en/gun/1.0/guide/protocols/index.html index fd5b4adf..d8d48a5d 100644 --- a/docs/en/gun/1.0/guide/protocols/index.html +++ b/docs/en/gun/1.0/guide/protocols/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Supported protocols</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -331,13 +331,13 @@ cellspacing="0" cellpadding="4"> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/gun/1.0/guide/start/"> + <a style="float:left" href="https://ninenines.eu/docs/en/gun/1.0/guide/start/"> Starting and stopping </a> - <a style="float:right" href="http://ninenines.eu/docs/en/gun/1.0/guide/connect/"> + <a style="float:right" href="https://ninenines.eu/docs/en/gun/1.0/guide/connect/"> Connection </a> diff --git a/docs/en/gun/1.0/guide/start/index.html b/docs/en/gun/1.0/guide/start/index.html index c63aeeb9..39992b50 100644 --- a/docs/en/gun/1.0/guide/start/index.html +++ b/docs/en/gun/1.0/guide/start/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Starting and stopping</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -150,13 +150,13 @@ between the elements of the list.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/gun/1.0/guide/introduction/"> + <a style="float:left" href="https://ninenines.eu/docs/en/gun/1.0/guide/introduction/"> Introduction </a> - <a style="float:right" href="http://ninenines.eu/docs/en/gun/1.0/guide/protocols/"> + <a style="float:right" href="https://ninenines.eu/docs/en/gun/1.0/guide/protocols/"> Supported protocols </a> diff --git a/docs/en/gun/1.0/guide/websocket/index.html b/docs/en/gun/1.0/guide/websocket/index.html index e0d8262a..bec8fb19 100644 --- a/docs/en/gun/1.0/guide/websocket/index.html +++ b/docs/en/gun/1.0/guide/websocket/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Websocket</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -197,7 +197,7 @@ message.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/gun/1.0/guide/http/"> + <a style="float:left" href="https://ninenines.eu/docs/en/gun/1.0/guide/http/"> HTTP </a> diff --git a/docs/en/gun/1.0/index.html b/docs/en/gun/1.0/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/gun/1.0/index.html +++ b/docs/en/gun/1.0/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/gun/1.0/manual/gun/index.html b/docs/en/gun/1.0/manual/gun/index.html index 9d0f8788..5c92823c 100644 --- a/docs/en/gun/1.0/manual/gun/index.html +++ b/docs/en/gun/1.0/manual/gun/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: gun(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/gun/1.0/manual/gun_app/index.html b/docs/en/gun/1.0/manual/gun_app/index.html index ef2ec62e..ae3b83c8 100644 --- a/docs/en/gun/1.0/manual/gun_app/index.html +++ b/docs/en/gun/1.0/manual/gun_app/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: gun(7)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/gun/1.0/manual/index.html b/docs/en/gun/1.0/manual/index.html index 68dddf30..a5789a95 100644 --- a/docs/en/gun/1.0/manual/index.html +++ b/docs/en/gun/1.0/manual/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Gun Function Reference</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/gun/index.html b/docs/en/gun/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/gun/index.html +++ b/docs/en/gun/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/index.html b/docs/en/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/index.html +++ b/docs/en/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/ranch/1.2/guide/embedded/index.html b/docs/en/ranch/1.2/guide/embedded/index.html index 605e5f98..13418002 100644 --- a/docs/en/ranch/1.2/guide/embedded/index.html +++ b/docs/en/ranch/1.2/guide/embedded/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Embedded mode</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -120,13 +120,13 @@ more details on how Ranch does it.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/protocols/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/protocols/"> Protocols </a> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/parsers/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/parsers/"> Writing parsers </a> diff --git a/docs/en/ranch/1.2/guide/index.html b/docs/en/ranch/1.2/guide/index.html index 660570ce..08552458 100644 --- a/docs/en/ranch/1.2/guide/index.html +++ b/docs/en/ranch/1.2/guide/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Ranch User Guide</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/ranch/1.2/guide/internals/index.html b/docs/en/ranch/1.2/guide/internals/index.html index 84554e20..b43eed8f 100644 --- a/docs/en/ranch/1.2/guide/internals/index.html +++ b/docs/en/ranch/1.2/guide/internals/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Internals</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -165,7 +165,7 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/ssl_auth/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/ssl_auth/"> SSL client authentication </a> diff --git a/docs/en/ranch/1.2/guide/introduction/index.html b/docs/en/ranch/1.2/guide/introduction/index.html index b45d8fa4..4afe8227 100644 --- a/docs/en/ranch/1.2/guide/introduction/index.html +++ b/docs/en/ranch/1.2/guide/introduction/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Introduction</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -106,7 +106,7 @@ modifications but there is no guarantee that it will work as expected.</p></div> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/listeners/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/listeners/"> Listeners </a> diff --git a/docs/en/ranch/1.2/guide/listeners.asciidoc b/docs/en/ranch/1.2/guide/listeners.asciidoc index ef2d49c7..a776a584 100644 --- a/docs/en/ranch/1.2/guide/listeners.asciidoc +++ b/docs/en/ranch/1.2/guide/listeners.asciidoc @@ -4,7 +4,7 @@ A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket -programming is abstracted through the user of transport handlers. +programming is abstracted through the use of transport handlers. The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application. @@ -203,6 +203,24 @@ ranch:set_max_connections(tcp_echo, MaxConns). The change will occur immediately. +=== When running out of file descriptors + +Operating systems have limits on the number of sockets +which can be opened by applications. When this maximum is +reached the listener can no longer accept new connections. The +accept rate of the listener will be automatically reduced, and a +warning message will be logged. + +---- +=ERROR REPORT==== 13-Jan-2016::12:24:38 === +Ranch acceptor reducing accept rate: out of file descriptors +---- + +If you notice messages like this you should increase the number +of file-descriptors which can be opened by your application. How +this should be done is operating-system dependent. Please consult +the documentation of your operating system. + === Using a supervisor for connection processes Ranch allows you to define the type of process that will be used diff --git a/docs/en/ranch/1.2/guide/listeners/index.html b/docs/en/ranch/1.2/guide/listeners/index.html index c817a99c..ead3c4b8 100644 --- a/docs/en/ranch/1.2/guide/listeners/index.html +++ b/docs/en/ranch/1.2/guide/listeners/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Listeners</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -73,7 +73,7 @@ for new connections. It manages a pool of acceptor processes, each
of them indefinitely accepting connections. When it does, it starts
a new process executing the protocol handler code. All the socket
-programming is abstracted through the user of transport handlers.</p></div>
+programming is abstracted through the use of transport handlers.</p></div>
<div class="paragraph"><p>The listener takes care of supervising all the acceptor and connection
processes, allowing developers to focus on building their application.</p></div>
<div class="sect1">
@@ -302,6 +302,25 @@ http://www.gnu.org/software/src-highlite --> </div>
</div>
<div class="sect1">
+<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Operating systems have limits on the number of sockets
+which can be opened by applications. When this maximum is
+reached the listener can no longer accept new connections. The
+accept rate of the listener will be automatically reduced, and a
+warning message will be logged.</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
+Ranch acceptor reducing accept rate: out of file descriptors</code></pre>
+</div></div>
+<div class="paragraph"><p>If you notice messages like this you should increase the number
+of file-descriptors which can be opened by your application. How
+this should be done is operating-system dependent. Please consult
+the documentation of your operating system.</p></div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
<div class="sectionbody">
<div class="paragraph"><p>Ranch allows you to define the type of process that will be used
@@ -359,13 +378,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/introduction/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/introduction/"> Introduction </a> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/transports/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/transports/"> Transports </a> diff --git a/docs/en/ranch/1.2/guide/parsers/index.html b/docs/en/ranch/1.2/guide/parsers/index.html index 524d645f..c6a2ddab 100644 --- a/docs/en/ranch/1.2/guide/parsers/index.html +++ b/docs/en/ranch/1.2/guide/parsers/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Writing parsers</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -181,13 +181,13 @@ immediately if any. Otherwise wait for more data.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/embedded/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/embedded/"> Embedded mode </a> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/ssl_auth/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/ssl_auth/"> SSL client authentication </a> diff --git a/docs/en/ranch/1.2/guide/protocols/index.html b/docs/en/ranch/1.2/guide/protocols/index.html index 7cb1b338..e2f313f9 100644 --- a/docs/en/ranch/1.2/guide/protocols/index.html +++ b/docs/en/ranch/1.2/guide/protocols/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Protocols</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -201,13 +201,13 @@ http://www.gnu.org/software/src-highlite --> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/transports/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/transports/"> Transports </a> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/embedded/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/embedded/"> Embedded mode </a> diff --git a/docs/en/ranch/1.2/guide/ssl_auth/index.html b/docs/en/ranch/1.2/guide/ssl_auth/index.html index ee3b1edb..cd38f30a 100644 --- a/docs/en/ranch/1.2/guide/ssl_auth/index.html +++ b/docs/en/ranch/1.2/guide/ssl_auth/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: SSL client authentication</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -230,13 +230,13 @@ user.</p></div> <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/parsers/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/parsers/"> Writing parsers </a> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/internals/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/internals/"> Internals </a> diff --git a/docs/en/ranch/1.2/guide/transports/index.html b/docs/en/ranch/1.2/guide/transports/index.html index 4b6d05dc..682cd26b 100644 --- a/docs/en/ranch/1.2/guide/transports/index.html +++ b/docs/en/ranch/1.2/guide/transports/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Transports</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -261,13 +261,13 @@ is the transport’s module. See <code>ranch_ssl</code> for an example.</p>< <nav style="margin:1em 0"> - <a style="float:left" href="http://ninenines.eu/docs/en/ranch/1.2/guide/listeners/"> + <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.2/guide/listeners/"> Listeners </a> - <a style="float:right" href="http://ninenines.eu/docs/en/ranch/1.2/guide/protocols/"> + <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.2/guide/protocols/"> Protocols </a> diff --git a/docs/en/ranch/1.2/index.html b/docs/en/ranch/1.2/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/ranch/1.2/index.html +++ b/docs/en/ranch/1.2/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/en/ranch/1.2/manual/index.html b/docs/en/ranch/1.2/manual/index.html index 0ee1cd10..83666bc9 100644 --- a/docs/en/ranch/1.2/manual/index.html +++ b/docs/en/ranch/1.2/manual/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Ranch Function Reference</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/ranch/1.2/manual/ranch/index.html b/docs/en/ranch/1.2/manual/ranch/index.html index ec646294..7a16695c 100644 --- a/docs/en/ranch/1.2/manual/ranch/index.html +++ b/docs/en/ranch/1.2/manual/ranch/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: ranch(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -185,7 +185,7 @@ Ranch that it initialized properly and let it perform any additional operations before the socket can be safely used.</p></div>
</div>
<div class="sect2">
-<h3 id="_child_spec_ref_nbacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) → supervisor:child_spec()</h3>
+<h3 id="_child_spec_ref_numacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) → supervisor:child_spec()</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
Ref = ref()
@@ -196,7 +196,7 @@ Listener name. </p>
</dd>
<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
+NumAcceptors = non_neg_integer()
</dt>
<dd>
<p>
@@ -405,7 +405,7 @@ New protocol options. Old connections will not receive the new options.</p></div>
</div>
<div class="sect2">
-<h3 id="_start_listener_ref_nbacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) → {ok, pid()} | {error, badarg}</h3>
+<h3 id="_start_listener_ref_numacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) → {ok, pid()} | {error, badarg}</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
Ref = ref()
@@ -416,7 +416,7 @@ Listener name. </p>
</dd>
<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
+NumAcceptors = non_neg_integer()
</dt>
<dd>
<p>
diff --git a/docs/en/ranch/1.2/manual/ranch_app/index.html b/docs/en/ranch/1.2/manual/ranch_app/index.html index 69de0340..24123477 100644 --- a/docs/en/ranch/1.2/manual/ranch_app/index.html +++ b/docs/en/ranch/1.2/manual/ranch_app/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: ranch(7)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/ranch/1.2/manual/ranch_protocol/index.html b/docs/en/ranch/1.2/manual/ranch_protocol/index.html index 80c1043a..27eb6c9d 100644 --- a/docs/en/ranch/1.2/manual/ranch_protocol/index.html +++ b/docs/en/ranch/1.2/manual/ranch_protocol/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: ranch_protocol(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/ranch/1.2/manual/ranch_ssl/index.html b/docs/en/ranch/1.2/manual/ranch_ssl/index.html index 4cbea083..9fe7c6a6 100644 --- a/docs/en/ranch/1.2/manual/ranch_ssl/index.html +++ b/docs/en/ranch/1.2/manual/ranch_ssl/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: ranch_ssl(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/ranch/1.2/manual/ranch_tcp/index.html b/docs/en/ranch/1.2/manual/ranch_tcp/index.html index d1a201e1..44e289c5 100644 --- a/docs/en/ranch/1.2/manual/ranch_tcp/index.html +++ b/docs/en/ranch/1.2/manual/ranch_tcp/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: ranch_tcp(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> @@ -106,6 +106,7 @@ http://www.gnu.org/software/src-highlite --> | <span style="color: #FF6600">inet</span>
| <span style="color: #FF6600">inet6</span>
| {<span style="color: #FF6600">ip</span>, <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>()}
+ | {<span style="color: #FF6600">ipv6_v6only</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
| {<span style="color: #FF6600">keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
| {<span style="color: #FF6600">linger</span>, {<span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}}
| {<span style="color: #FF6600">low_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
@@ -229,6 +230,14 @@ ip </p>
</dd>
<dt class="hdlist1">
+ipv6_v6only (false)
+</dt>
+<dd>
+<p>
+ Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.
+</p>
+</dd>
+<dt class="hdlist1">
keepalive (false)
</dt>
<dd>
diff --git a/docs/en/ranch/1.2/manual/ranch_transport/index.html b/docs/en/ranch/1.2/manual/ranch_transport/index.html index ad1784fd..9bfb4786 100644 --- a/docs/en/ranch/1.2/manual/ranch_transport/index.html +++ b/docs/en/ranch/1.2/manual/ranch_transport/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: ranch_transport(3)</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> diff --git a/docs/en/ranch/index.html b/docs/en/ranch/index.html index c1eedb2f..ea24e654 100644 --- a/docs/en/ranch/index.html +++ b/docs/en/ranch/index.html @@ -1 +1 @@ -<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html>
\ No newline at end of file +<!DOCTYPE html><html><head><link rel="canonical" href="https://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=https://ninenines.eu/docs/" /></head></html>
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 699671a1..e3f50323 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,7 +11,7 @@ <title>Nine Nines: Documentation</title> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/99s.css" rel="stylesheet"> 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><div class="ulist"><ul>
<li>
<p>
@@ -62,11 +62,31 @@ </li>
<li>
<p>
+<a href="cowboy.set_env">cowboy:set_env(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy.start_clear">cowboy:start_clear(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy.start_tls">cowboy:start_tls(3)</a>
+</p>
+</li>
+<li>
+<p>
<a href="cowboy_static">cowboy_static(3)</a>
</p>
</li>
<li>
<p>
+<a href="cowboy.stop_listener">cowboy:stop_listener(3)</a>
+</p>
+</li>
+<li>
+<p>
<a href="cowboy_sub_protocol">cowboy_sub_protocol(3)</a>
</p>
</li>
@@ -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><div class="sect1">
<h2 id="_rationale">Rationale</h2>
<div class="sectionbody">
@@ -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><div class="ulist"><ul>
<li>
<p>
@@ -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><div class="ulist"><ul>
<li>
<p>
@@ -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><div class="ulist"><ul>
<li>
<p>
@@ -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><div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
@@ -804,10 +824,10 @@ client and the connection is closed.</p></div> <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><div class="ulist"><ul>
<li>
<p>
@@ -845,10 +865,10 @@ client and the connection is closed.</p></div> <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><div class="ulist"><ul>
<li>
<p>
@@ -896,10 +916,10 @@ client and the connection is closed.</p></div> <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><div class="paragraph"><p>This chapter explains the different steps a request
goes through until a response is sent, along with
details of the Cowboy implementation.</p></div>
@@ -1048,10 +1068,10 @@ at this point, however.</p></div> <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><div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
@@ -1066,207 +1086,276 @@ manipulating Ranch listeners.</p></div> </div>
</div>
<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&#8217;s environment value
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_types">Types</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_fields_field">fields() = [Field]</h3>
+<h3 id="_fields">fields()</h3>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">Field</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
- | {<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>() | [<span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()]}
- | {<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>() | [<span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()], <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Fields for match operations. Constraint(s) and default value are optional.</p></div>
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
+ | {<span style="color: #009900">Name</span>, <span style="color: #009900">Constraints</span>}
+ | {<span style="color: #009900">Name</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Default</span>}]
+
+<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
+<span style="color: #009900">Constraints</span> <span style="color: #990000">::</span> <span style="color: #009900">Constraint</span> | [<span style="color: #009900">Constraint</span>]
+<span style="color: #009900">Constraint</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()
+<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Fields description for match operations.</p></div>
+<div class="paragraph"><p>This type is used in <a href="../cowboy_router">cowboy_router</a>
+for matching bindings and in the match functions found in
+<a href="../cowboy_req">cowboy_req</a>.</p></div>
</div>
<div class="sect2">
-<h3 id="_http_headers_binary_iodata">http_headers() = [{binary(), iodata()}]</h3>
-<div class="paragraph"><p>HTTP headers as a list of key/values.</p></div>
+<h3 id="_http_headers">http_headers()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">http_headers</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>HTTP headers.</p></div>
</div>
<div class="sect2">
-<h3 id="_http_status_non_neg_integer_binary">http_status() = non_neg_integer() | binary()</h3>
-<div class="paragraph"><p>HTTP status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a custom message.</p></div>
+<h3 id="_http_status">http_status()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>HTTP response status.</p></div>
+<div class="paragraph"><p>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.</p></div>
</div>
<div class="sect2">
-<h3 id="_http_version_http_1_1_http_1_0">http_version() = 'HTTP/1.1' | 'HTTP/1.0'</h3>
+<h3 id="_http_version">http_version()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
<div class="paragraph"><p>HTTP version.</p></div>
+<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
</div>
<div class="sect2">
-<h3 id="_code_onresponse_fun_fun_http_status_http_headers_iodata_cowboy_req_req_gt_cowboy_req_req_code"><code>onresponse_fun() = fun((http_status(), http_headers(), iodata(), cowboy_req:req()) -&gt; cowboy_req:req())</code></h3>
-<div class="paragraph"><p>Fun called immediately before sending the response.</p></div>
-<div class="paragraph"><p>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.</p></div>
+<h3 id="_opts">opts()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
+<div class="paragraph"><p>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.</p></div>
+<div class="paragraph"><p>The HTTP/1.1 options are documented in the
+<a href="../cowboy_http">cowboy_http(3)</a> manual;
+the HTTP/2 options in
+<a href="../cowboy_http">cowboy_http2(3)</a>;
+and the Websocket options in
+<a href="../cowboy_websocket">cowboy_websocket(3)</a>.</p></div>
</div>
</div>
</div>
<div class="sect1">
-<h2 id="_exports">Exports</h2>
+<h2 id="_see_also">See also</h2>
<div class="sectionbody">
-<div class="sect2">
-<h3 id="_start_http_ref_nbacceptors_transopts_protoopts_8594_ok_pid">start_http(Ref, NbAcceptors, TransOpts, ProtoOpts) &#8594; {ok, pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
+<div class="paragraph"><p><a href="../cowboy_app">cowboy(7)</a>,
+<a href="../ranch">ranch(3)</a></p></div>
+</div>
+</div>
+</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><div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
+HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
+<div class="paragraph"><p>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.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_modules">Modules</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Functions:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-Listener name.
+<a href="../cowboy">cowboy(3)</a> - Listener management
</p>
-</dd>
-<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Number of acceptor processes.
+<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = ranch_tcp:opts()
-</dt>
-<dd>
+</li>
+<li>
<p>
-TCP transport options.
+<a href="../cowboy_router">cowboy_router(3)</a> - Router
</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = cowboy_protocol:opts()
-</dt>
-<dd>
+</li>
+</ul></div>
+<div class="paragraph"><p>Protocols:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-HTTP protocol options.
+<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for HTTP connections. Returns the pid for this
-listener&#8217;s supervisor.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_start_https_ref_nbacceptors_transopts_protoopts_8594_ok_pid">start_https(Ref, NbAcceptors, TransOpts, ProtoOpts) &#8594; {ok, pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Listener name.
+<a href="../cowboy_http">cowboy_http2(3)</a> - HTTP/2
</p>
-</dd>
-<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Number of acceptor processes.
+<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = ranch_ssl:opts()
-</dt>
-<dd>
+</li>
+</ul></div>
+<div class="paragraph"><p>Handlers:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-SSL transport options.
+<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = cowboy_protocol:opts()
-</dt>
-<dd>
+</li>
+</ul></div>
+<div class="paragraph"><p>Behaviors:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-HTTP protocol options.
+<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for HTTPS connections. Returns the pid for this
-listener&#8217;s supervisor.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Listener name.
+<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_env_ref_name_value_8594_ok">set_env(Ref, Name, Value) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Listener name.
+<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</p>
-</dd>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Name of environment value.
+<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Environment value.
+<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set or update an environment value for an already running listener.
-This will take effect on all subsequent connections.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <a href="http://ninenines.eu/docs/en/ranch/HEAD/guide">Ranch guide</a>
-provides detailed information about how listeners work.</p></div>
-</div>
-</div>
-</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><div class="sect1">
-<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modular HTTP server.</p></div>
+</li>
+<li>
+<p>
+<a href="../cowboy_sub_protocol">cowboy_sub_protocol(3)</a> - Sub protocols
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Middlewares:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
+</p>
+</li>
+<li>
+<p>
+<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
+</p>
+</li>
+</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_dependencies">Dependencies</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application uses the Erlang applications <code>ranch</code>
-for listening and accepting TCP connections, <code>crypto</code> for
-establishing Websocket connections, and <code>cowlib</code> for parsing and
-building messages for Web protocols. These dependencies must
-be loaded for the <code>cowboy</code> application to work. In an embedded
-environment this means that they need to be started with the
-<code>application:start/{1,2}</code> function before the <code>cowboy</code>
-application is started.</p></div>
-<div class="paragraph"><p>The <code>cowboy</code> application also uses the Erlang applications
-<code>asn1</code>, <code>public_key</code> and <code>ssl</code> when listening for HTTPS connections.
-These are started automatically if they weren&#8217;t before.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
+</p>
+</li>
+<li>
+<p>
+<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
+</p>
+</li>
+<li>
+<p>
+ssl - Secure communication over sockets
+</p>
+</li>
+<li>
+<p>
+crypto - Crypto functions
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
+application. To start Cowboy and all dependencies at once:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<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">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
</div>
</div>
<div class="sect1">
@@ -1276,636 +1365,571 @@ These are started automatically if they weren&#8217;t before.</p></ environment configuration parameters.</p></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
+<a href="../cowlib">cowlib(7)</a></p></div>
+</div>
+</div>
</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><div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - handler middleware and behaviour</p></div>
+<div class="paragraph"><p>cowboy:set_env - Update a listener&#8217;s environment value</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">Description</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_handler</code> middleware executes the handler passed
-through the environment values <code>handler</code> and <code>handler_opts</code>,
-and adds the result of this execution to the environment as
-the value <code>result</code>, indicating that the request has been
-handled and received a response.</p></div>
-<div class="paragraph"><p>Environment input:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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">set_env</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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
+ <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
+ <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
+<div class="paragraph"><p>Set or update an environment value for a previously started
+listener.</p></div>
+<div class="paragraph"><p>This is most useful for updating the routes dynamically,
+without having to restart the listener.</p></div>
+<div class="paragraph"><p>The new value will only be available to new connections.
+Pre-existing connections will still use the old value.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
-handler = module()
+Name
</dt>
<dd>
<p>
-Handler to be executed.
+The name of the listener to update.
</p>
+<div class="paragraph"><p>The name of the listener is the first argument given to the
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
+<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
</dd>
<dt class="hdlist1">
-handler_opts = any()
+Key
</dt>
<dd>
<p>
-Options to be passed to the handler.
+The key in the environment map. Common keys include <code>dispatch</code>
+and <code>middlewares</code>.
</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Environment output:</p></div>
-<div class="dlist"><dl>
<dt class="hdlist1">
-result = ok
+Value
</dt>
<dd>
<p>
-Result of the request.
+The new value.
</p>
</dd>
</dl></div>
-<div class="paragraph"><p>This module also defines the <code>cowboy_handler</code> behaviour that
-defines the basic interface for handlers. All Cowboy handlers
-implement at least the <code>init/2</code> callback, and may implement
-the <code>terminate/3</code> callback optionally.</p></div>
+<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
</div>
</div>
<div class="sect1">
-<h2 id="_terminate_reasons">Terminate reasons</h2>
+<h2 id="_return_value">Return value</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The following values may be received as the terminate reason
-in the optional <code>terminate/3</code> callback. Different handler types
-may define additional terminate reasons.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally.
-</p>
-</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
-</dd>
-</dl></div>
+<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
+<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
+not exist.</p></div>
</div>
</div>
<div class="sect1">
-<h2 id="_callbacks">Callbacks</h2>
+<h2 id="_changelog">Changelog</h2>
<div class="sectionbody">
-<div class="sect2">
-<h3 id="_init_req_opts_8594_ok_req_state_module_req_state_module_req_state_hibernate_timeout_module_req_state_timeout_hibernate">init(Req, Opts) &#8594; {ok, Req, State} | {Module, Req, State} | {Module, Req, State, hibernate | Timeout} | {Module, Req, State, Timeout, hibernate}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req = cowboy_req:req()
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-</dd>
-<dt class="hdlist1">
-Opts = any()
-</dt>
-<dd>
-<p>
-Handler options.
-</p>
-</dd>
-<dt class="hdlist1">
-State = any()
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
-</dd>
-<dt class="hdlist1">
-Module = module()
-</dt>
-<dd>
-<p>
-Module of the sub-protocol to use.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
+<div class="ulist"><ul>
+<li>
<p>
-Timeout passed to the sub-protocol, when applicable.
+<strong>1.0</strong>: Function introduced.
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Process the request.</p></div>
-<div class="paragraph"><p>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.</p></div>
-<div class="paragraph"><p>For basic handlers this is the function where the response
-should be sent. If no response is sent, Cowboy will ensure
-that a <code>204 No Content</code> response is sent.</p></div>
-<div class="paragraph"><p>A crash in this callback will result in <code>terminate/3</code> being
-called if it is defined, with the <code>State</code> argument set to
-the value of <code>Opts</code> originally given to the <code>init/2</code> callback.</p></div>
+</li>
+</ul></div>
</div>
-<div class="sect2">
-<h3 id="_terminate_reason_req_state_8594_ok">terminate(Reason, Req, State) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason = any()
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
-</dd>
-<dt class="hdlist1">
-Req = cowboy_req:req()
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-</dd>
-<dt class="hdlist1">
-State = any()
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Perform any necessary cleanup of the state.</p></div>
-<div class="paragraph"><p>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.</p></div>
-<div class="paragraph"><p>A crash in this callback or an invalid return value will
-result in the closing of the connection and the termination
-of the process.</p></div>
</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Update a listener&#8217;s routes</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><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">toppage_h</span>, []},
+ {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+ ]}
+]),
+
+<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
</div>
</div>
<div class="sect1">
-<h2 id="_exports">Exports</h2>
+<h2 id="_see_also">See also</h2>
<div class="sectionbody">
-<div class="sect2">
-<h3 id="_terminate_reason_req_state_handler_8594_ok">terminate(Reason, Req, State, Handler) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason = any()
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
-</dd>
-<dt class="hdlist1">
-Req = cowboy_req:req()
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-</dd>
-<dt class="hdlist1">
-State = any()
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
-</dd>
-<dt class="hdlist1">
-Handler = module()
-</dt>
-<dd>
-<p>
-Handler module.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Call the optional <code>terminate/3</code> callback if it exists.</p></div>
-<div class="paragraph"><p>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.</p></div>
-</div>
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
+<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
</div>
</div>
</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><div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
-<div class="paragraph"><p>cowboy_loop - loop handlers</p></div>
+<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">Description</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_loop</code> module implements a handler interface for
-long running HTTP connections. It is the recommended interface
-for long polling and server-sent events, amongst others.</p></div>
-<div class="paragraph"><p>This module is a sub protocol that defines three callbacks to
-be implemented by handlers. The <code>init/2</code> and <code>terminate/3</code>
-callbacks are common to all handler types and are documented
-in the manual for the <a href="cowboy_handler.asciidoc">cowboy_handler</a> module.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback is specific to loop handlers and will be
-called as many times as necessary until a reply is sent.</p></div>
-<div class="paragraph"><p>It is highly recommended to return a timeout value from the
-<code>init/2</code> callback to ensure that the process is terminated
-when no data has been received during that timespan. The
-default timeout is <code>infinity</code>, which should only be used if
-you have alternate means of ending inactive connections.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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>()}
+ | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
+<div class="paragraph"><p>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.</p></div>
</div>
</div>
<div class="sect1">
-<h2 id="_terminate_reasons">Terminate reasons</h2>
+<h2 id="_arguments">Arguments</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The following values may be received as the terminate reason
-in the optional <code>terminate/3</code> callback.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally before switching to the
- loop sub protocol. This typically happens if an <code>ok</code> tuple is
- returned from the <code>init/2</code> callback.
-</p>
-</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection by returning
- a <code>stop</code> tuple.
-</p>
-</dd>
-<dt class="hdlist1">
-timeout
-</dt>
-<dd>
-<p>
- The connection has been closed due to inactivity. The timeout
- value can be configured from <code>init/2</code>. The response sent when
- this happens is a <code>204 No Content</code>.
-</p>
-</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
+Name
</dt>
<dd>
<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> 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.
</p>
+<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
+for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
</dd>
<dt class="hdlist1">
-{error, overflow}
+NumAcceptors
</dt>
<dd>
<p>
- 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 <code>loop_max_buffer</code>
- and defaults to 5000 bytes.
- <br />
- If the long running request comes with a body it is recommended
- to process this body before switching to the loop sub protocol.
-</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">
-{error, closed}
+TransportOpts
</dt>
<dd>
<p>
- The socket has been closed brutally without a close frame being
- received first.
+The transport options are where the TCP options, including
+the listener&#8217;s port number, are defined. Transport options
+are provided as a list of keys and values, for example
+<code>[{port, 8080}]</code>.
</p>
+<div class="paragraph"><p>The available options are documented in the
+<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
</dd>
<dt class="hdlist1">
-{error, Reason}
+ProtocolOpts
</dt>
<dd>
<p>
- A socket error ocurred.
-</p>
+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.
+</p>
+<div class="paragraph"><p>The HTTP/1.1 options are documented in the
+<a href="../cowboy_http">cowboy_http(3)</a> manual;
+the HTTP/2 options in
+<a href="../cowboy_http">cowboy_http2(3)</a>;
+and the Websocket options in
+<a href="../cowboy_websocket">cowboy_websocket(3)</a>.</p></div>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
-<h2 id="_callbacks">Callbacks</h2>
+<h2 id="_return_value">Return value</h2>
<div class="sectionbody">
-<div class="sect2">
-<h3 id="_info_info_req_state_8594_ok_req_state_ok_req_state_hibernate_stop_req_state">info(Info, Req, State) &#8594; {ok, Req, State} | {ok, Req, State, hibernate} | {stop, Req, State}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Info = any()
-</dt>
-<dd>
-<p>
-Message received by the process.
-</p>
-</dd>
-<dt class="hdlist1">
-Req = cowboy_req:req()
-</dt>
-<dd>
+<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
+the top-level supervisor for the listener.</p></div>
+<div class="paragraph"><p>An error tuple is returned on error. The error reason may
+be any Erlang term.</p></div>
+<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
+configured for Cowboy is already in use.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
<p>
-The Req object.
+<strong>2.0</strong>: HTTP/2 support added.
</p>
-</dd>
-<dt class="hdlist1">
-State = any()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Handler state.
+<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Handle the Erlang message received.</p></div>
-<div class="paragraph"><p>This function will be called every time an Erlang message
-has been received. The message can be any Erlang term.</p></div>
-<div class="paragraph"><p>The <code>stop</code> return value can be used to stop the receive loop,
-typically because a response has been sent.</p></div>
-<div class="paragraph"><p>The <code>hibernate</code> option will hibernate the process until
-it receives another message.</p></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Start a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><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">toppage_h</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: #993399">100</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">
+<div class="title">Start a listener on a random port</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+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: #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: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
+<a href="../ranch">ranch(3)</a></p></div>
</div>
</div>
</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><div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
-<div class="paragraph"><p>cowboy_middleware - behaviour for middlewares</p></div>
+<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">Description</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_middleware</code> behaviour defines the interface used
-by Cowboy middleware modules.</p></div>
-<div class="paragraph"><p>Middlewares process the request sequentially in the order they
-are configured.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_env_atom_any">env() = [{atom(), any()}]</h3>
-<div class="paragraph"><p>The environment variable.</p></div>
-<div class="paragraph"><p>One is created for every request. It is passed to each
-middleware module executed and subsequently returned,
-optionally with its contents modified.</p></div>
-</div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+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>()}
+ | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
+<div class="paragraph"><p>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.</p></div>
</div>
</div>
<div class="sect1">
-<h2 id="_callbacks">Callbacks</h2>
+<h2 id="_arguments">Arguments</h2>
<div class="sectionbody">
-<div class="sect2">
-<h3 id="_execute_req_env_8594_ok_req_env_suspend_module_function_args_stop_req">execute(Req, Env) &#8594; {ok, Req, Env} | {suspend, Module, Function, Args} | {stop, Req}</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
-Req = cowboy_req:req()
+Name
</dt>
<dd>
<p>
-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.
</p>
+<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
+for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
</dd>
<dt class="hdlist1">
-Env = env()
+NumAcceptors
</dt>
<dd>
<p>
-The request environment.
-</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">
-Module = module()
+TransportOpts
</dt>
<dd>
<p>
-MFA to call when resuming the process.
+The transport options are where the TCP options, including
+the listener&#8217;s port number, are defined. They also contain
+the TLS options, like the server&#8217;s certificate. Transport options
+are provided as a list of keys and values, for example
+<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
</p>
+<div class="paragraph"><p>The available options are documented in the
+<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
</dd>
<dt class="hdlist1">
-Function = atom()
+ProtocolOpts
</dt>
<dd>
<p>
-MFA to call when resuming the process.
-</p>
+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.
+</p>
+<div class="paragraph"><p>The HTTP/1.1 options are documented in the
+<a href="../cowboy_http">cowboy_http(3)</a> manual;
+the HTTP/2 options in
+<a href="../cowboy_http">cowboy_http2(3)</a>;
+and the Websocket options in
+<a href="../cowboy_websocket">cowboy_websocket(3)</a>.</p></div>
</dd>
-<dt class="hdlist1">
-Args = [any()]
-</dt>
-<dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
+the top-level supervisor for the listener.</p></div>
+<div class="paragraph"><p>An error tuple is returned on error. The error reason may
+be any Erlang term.</p></div>
+<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
+configured for Cowboy is already in use.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
<p>
-MFA to call when resuming the process.
+<strong>2.0</strong>: HTTP/2 support added.
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Execute the middleware.</p></div>
-<div class="paragraph"><p>The <code>ok</code> return value indicates that everything went well
-and that Cowboy should continue processing the request. A
-response may or may not have been sent.</p></div>
-<div class="paragraph"><p>The <code>suspend</code> return value will hibernate the process until
-an Erlang message is received. Note that when resuming, any
-previous stacktrace information will be gone.</p></div>
-<div class="paragraph"><p>The <code>stop</code> return value stops Cowboy from doing any further
-processing of the request, even if there are middlewares
-that haven&#8217;t been executed yet. The connection may be left
-open to receive more requests from the client.</p></div>
+</li>
+<li>
+<p>
+<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
+</p>
+</li>
+</ul></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Start a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><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">toppage_h</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: #993399">100</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>}
+], #{
+ <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">
+<div class="title">Start a listener on a random port</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+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">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>}
+}),
+
+<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../ranch">ranch(3)</a></p></div>
+</div>
</div>
</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><div class="sect1">
<h2 id="_name">Name</h2>
<div class="sectionbody">
-<div class="paragraph"><p>cowboy_protocol - HTTP protocol</p></div>
+<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">Description</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_protocol</code> module implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_opts_option">opts() = [Option]</h3>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">compress</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">env</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()}
- | {<span style="color: #FF6600">max_empty_lines</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">max_header_name_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">max_header_value_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">max_headers</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">max_keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">max_request_line_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">middlewares</span>, [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]}
- | {<span style="color: #FF6600">onresponse</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:onresponse_fun</span></span>()}
- | {<span style="color: #FF6600">timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP protocol handler.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_http/4</code> or <code>cowboy:start_https/4</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>
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">stop_listener</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: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Stop a previously started listener.</p></div>
+<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
</div>
-<div class="sect2">
-<h3 id="_option_descriptions">Option descriptions</h3>
-<div class="paragraph"><p>The default value is given next to the option name.</p></div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
-compress (false)
-</dt>
-<dd>
-<p>
- When enabled, Cowboy will attempt to compress the response body.
-</p>
-</dd>
-<dt class="hdlist1">
-env ([{listener, Ref}])
+Name
</dt>
<dd>
<p>
- Initial middleware environment.
+The name of the listener to be stopped.
</p>
+<div class="paragraph"><p>The name of the listener is the first argument given to the
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
+<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
</dd>
-<dt class="hdlist1">
-max_empty_lines (5)
-</dt>
-<dd>
-<p>
- Maximum number of empty lines before a request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_name_length (64)
-</dt>
-<dd>
-<p>
- Maximum length of header names.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_value_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of header values.
-</p>
-</dd>
-<dt class="hdlist1">
-max_headers (100)
-</dt>
-<dd>
-<p>
- Maximum number of headers allowed per request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_keepalive (100)
-</dt>
-<dd>
-<p>
- Maximum number of requests allowed per connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_request_line_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of the request line.
-</p>
-</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- List of middlewares to execute for every requests.
-</p>
-</dd>
-<dt class="hdlist1">
-onresponse (undefined)
-</dt>
-<dd>
-<p>
- Fun called every time a response is sent.
-</p>
-</dd>
-<dt class="hdlist1">
-timeout (5000)
-</dt>
-<dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
+<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
+does not exist.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
<p>
- Time in ms with no requests before Cowboy closes the connection.
+<strong>1.0</strong>: Function introduced.
</p>
-</dd>
-</dl></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Stop a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
+<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
+<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
+<a href="../ranch">ranch(3)</a>,
+<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
+</div>
</div>
</description> </item> |