summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-08-01 16:52:33 +0200
committerLoïc Hoguin <[email protected]>2018-08-01 16:52:33 +0200
commita63ee9b363aa7214343966690b50d77f4d3475e6 (patch)
tree3172bf0b364d9c3d76cfe5bed15154254460ba53
parent34bea68bc8c23429ab788387b4db110135789adf (diff)
downloadninenines.eu-a63ee9b363aa7214343966690b50d77f4d3475e6.tar.gz
ninenines.eu-a63ee9b363aa7214343966690b50d77f4d3475e6.tar.bz2
ninenines.eu-a63ee9b363aa7214343966690b50d77f4d3475e6.zip
Ranch 1.6.0
-rw-r--r--_build/Makefile4
-rw-r--r--_build/content/articles/ranch-1.6.0.asciidoc40
-rw-r--r--_build/data/projects/ranch.toml4
-rw-r--r--articles/asciideck/index.html4
-rw-r--r--articles/cowboy-2.0.0-pre.4/index.html4
-rw-r--r--articles/cowboy-2.0.0-rc.1/index.html4
-rw-r--r--articles/cowboy-2.0.0-rc.2/index.html4
-rw-r--r--articles/cowboy-2.0.0/index.html4
-rw-r--r--articles/cowboy-2.1.0/index.html4
-rw-r--r--articles/cowboy-2.2.0/index.html4
-rw-r--r--articles/cowboy-2.3.0/index.html4
-rw-r--r--articles/cowboy-2.4.0/index.html4
-rw-r--r--articles/cowboy2-qs/index.html4
-rw-r--r--articles/dont-let-it-crash/index.html4
-rw-r--r--articles/erlang-scalability/index.html4
-rw-r--r--articles/erlang-validate-utf8/index.html4
-rw-r--r--articles/erlang.mk-and-relx/index.html4
-rw-r--r--articles/erlanger-playbook-september-2015-update/index.html4
-rw-r--r--articles/erlanger-playbook/index.html4
-rw-r--r--articles/farwest-funded/index.html4
-rw-r--r--articles/gun-1.0.0-rc.1/index.html4
-rw-r--r--articles/gun-1.0.0/index.html4
-rw-r--r--articles/index.html34
-rw-r--r--articles/index.xml13
-rw-r--r--articles/january-2014-status/index.html4
-rw-r--r--articles/ml-archives/index.html4
-rw-r--r--articles/on-open-source/index.html4
-rw-r--r--articles/page/2/index.html16
-rw-r--r--articles/ranch-1.3/index.html4
-rw-r--r--articles/ranch-1.6.0/index.html262
-rw-r--r--articles/ranch-ftp/index.html4
-rw-r--r--articles/the-elephant-in-the-room/index.html4
-rw-r--r--articles/the-story-so-far/index.html4
-rw-r--r--articles/tictactoe/index.html4
-rw-r--r--articles/website-update/index.html4
-rw-r--r--articles/xerl-0.1-empty-modules/index.html4
-rw-r--r--articles/xerl-0.2-two-modules/index.html4
-rw-r--r--articles/xerl-0.3-atomic-expressions/index.html4
-rw-r--r--articles/xerl-0.4-expression-separator/index.html4
-rw-r--r--articles/xerl-0.5-intermediate-module/index.html4
-rw-r--r--docs/en/ranch/1.2/guide/embedded/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/internals/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/introduction/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/listeners/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/parsers/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/protocols/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/ssl_auth/index.html2
-rw-r--r--docs/en/ranch/1.2/guide/transports/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/ranch/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/ranch_app/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/ranch_protocol/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/ranch_ssl/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/ranch_tcp/index.html2
-rw-r--r--docs/en/ranch/1.2/manual/ranch_transport/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/embedded/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/internals/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/introduction/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/listeners/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/parsers/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/protocols/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/ssl_auth/index.html2
-rw-r--r--docs/en/ranch/1.3/guide/transports/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/ranch/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/ranch_app/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/ranch_protocol/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/ranch_ssl/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/ranch_tcp/index.html2
-rw-r--r--docs/en/ranch/1.3/manual/ranch_transport/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/embedded/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/internals/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/introduction/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/listeners/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/parsers/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/protocols/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/ssl_auth/index.html2
-rw-r--r--docs/en/ranch/1.4/guide/transports/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/ranch/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/ranch_app/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/ranch_protocol/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/ranch_ssl/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/ranch_tcp/index.html2
-rw-r--r--docs/en/ranch/1.4/manual/ranch_transport/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/embedded/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/internals/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/introduction/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/listeners/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/parsers/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/protocols/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/ssl_auth/index.html2
-rw-r--r--docs/en/ranch/1.5/guide/transports/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/ranch/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/ranch_app/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/ranch_protocol/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/ranch_ssl/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/ranch_tcp/index.html2
-rw-r--r--docs/en/ranch/1.5/manual/ranch_transport/index.html2
-rw-r--r--docs/en/ranch/1.6/guide/embedded.asciidoc48
-rw-r--r--docs/en/ranch/1.6/guide/embedded/index.html186
-rw-r--r--docs/en/ranch/1.6/guide/index.html171
-rw-r--r--docs/en/ranch/1.6/guide/internals.asciidoc94
-rw-r--r--docs/en/ranch/1.6/guide/internals/index.html190
-rw-r--r--docs/en/ranch/1.6/guide/introduction.asciidoc28
-rw-r--r--docs/en/ranch/1.6/guide/introduction/index.html170
-rw-r--r--docs/en/ranch/1.6/guide/listeners.asciidoc364
-rw-r--r--docs/en/ranch/1.6/guide/listeners/index.html405
-rw-r--r--docs/en/ranch/1.6/guide/migrating_from_1.5.asciidoc76
-rw-r--r--docs/en/ranch/1.6/guide/migrating_from_1.5/index.html205
-rw-r--r--docs/en/ranch/1.6/guide/migrating_from_1.x.asciidoc70
-rw-r--r--docs/en/ranch/1.6/guide/migrating_from_1.x/index.html258
-rw-r--r--docs/en/ranch/1.6/guide/parsers.asciidoc92
-rw-r--r--docs/en/ranch/1.6/guide/parsers/index.html225
-rw-r--r--docs/en/ranch/1.6/guide/protocols.asciidoc99
-rw-r--r--docs/en/ranch/1.6/guide/protocols/index.html232
-rw-r--r--docs/en/ranch/1.6/guide/ssl_auth.asciidoc120
-rw-r--r--docs/en/ranch/1.6/guide/ssl_auth/index.html238
-rw-r--r--docs/en/ranch/1.6/guide/transports.asciidoc172
-rw-r--r--docs/en/ranch/1.6/guide/transports/index.html272
-rw-r--r--docs/en/ranch/1.6/guide/upcoming_2.0_changes.asciidoc34
-rw-r--r--docs/en/ranch/1.6/guide/upcoming_2.0_changes/index.html179
-rw-r--r--docs/en/ranch/1.6/manual/index.html183
-rw-r--r--docs/en/ranch/1.6/manual/ranch.child_spec/index.html203
-rw-r--r--docs/en/ranch/1.6/manual/ranch.get_addr/index.html171
-rw-r--r--docs/en/ranch/1.6/manual/ranch.get_max_connections/index.html169
-rw-r--r--docs/en/ranch/1.6/manual/ranch.get_port/index.html170
-rw-r--r--docs/en/ranch/1.6/manual/ranch.get_protocol_options/index.html169
-rw-r--r--docs/en/ranch/1.6/manual/ranch.get_status/index.html172
-rw-r--r--docs/en/ranch/1.6/manual/ranch.get_transport_options/index.html169
-rw-r--r--docs/en/ranch/1.6/manual/ranch.handshake/index.html192
-rw-r--r--docs/en/ranch/1.6/manual/ranch.info/index.html217
-rw-r--r--docs/en/ranch/1.6/manual/ranch.procs/index.html180
-rw-r--r--docs/en/ranch/1.6/manual/ranch.remove_connection/index.html170
-rw-r--r--docs/en/ranch/1.6/manual/ranch.resume_listener/index.html176
-rw-r--r--docs/en/ranch/1.6/manual/ranch.set_max_connections/index.html174
-rw-r--r--docs/en/ranch/1.6/manual/ranch.set_protocol_options/index.html174
-rw-r--r--docs/en/ranch/1.6/manual/ranch.set_transport_options/index.html179
-rw-r--r--docs/en/ranch/1.6/manual/ranch.start_listener/index.html228
-rw-r--r--docs/en/ranch/1.6/manual/ranch.stop_listener/index.html173
-rw-r--r--docs/en/ranch/1.6/manual/ranch.suspend_listener/index.html177
-rw-r--r--docs/en/ranch/1.6/manual/ranch.wait_for_connections/index.html197
-rw-r--r--docs/en/ranch/1.6/manual/ranch/index.html280
-rw-r--r--docs/en/ranch/1.6/manual/ranch_app/index.html183
-rw-r--r--docs/en/ranch/1.6/manual/ranch_protocol/index.html169
-rw-r--r--docs/en/ranch/1.6/manual/ranch_ssl/index.html321
-rw-r--r--docs/en/ranch/1.6/manual/ranch_tcp/index.html268
-rw-r--r--docs/en/ranch/1.6/manual/ranch_transport.sendfile/index.html204
-rw-r--r--docs/en/ranch/1.6/manual/ranch_transport/index.html369
-rw-r--r--docs/index.html7
-rw-r--r--docs/index.xml482
-rw-r--r--donate/index.html80
-rw-r--r--index.html84
-rw-r--r--index.xml495
-rw-r--r--services/index.html80
-rw-r--r--sitemap.xml165
161 files changed, 11365 insertions, 26 deletions
diff --git a/_build/Makefile b/_build/Makefile
index 83a9ecf9..d4e72edb 100644
--- a/_build/Makefile
+++ b/_build/Makefile
@@ -73,7 +73,7 @@ docs-$1-$2: tmp/$1
printf "%s\n" "+++" "title = \"`sed 's/\(.\)/\U\1/' <<< $1` Function Reference\"" \
"project = \"$1\"" "version = \"$3\"" "doctype = \"manual\"" "+++" "" \
> content/docs/en/$1/$3/manual.asciidoc; \
- if [ "$1" = "cowboy" -o "$1" = "gun" ]; then \
+ if [ "$1" = "cowboy" -o "$1" = "gun" ] || [ "$1" = "ranch" -a "$3" = "1.6" ]; then \
sed '1,/^$$$$/d' tmp/$1/doc/src/manual/$1_app.asciidoc | sed 's/xref:/link:..\//' \
| sed 's/link:man:\([a-z0-9_]*\)(7)/link:\1_app/g' \
| sed 's/\(link:man:[a-z0-9_]*\):/\1./g' \
@@ -94,7 +94,7 @@ docs-$1-$2: tmp/$1
echo "\"" >> content/docs/en/$1/$3/manual/`basename $$$$f`; \
echo "+++" >> content/docs/en/$1/$3/manual/`basename $$$$f`; \
echo >> content/docs/en/$1/$3/manual/`basename $$$$f`; \
- if [ "$1" = "cowboy" -o "$1" = "gun" ]; then \
+ if [ "$1" = "cowboy" -o "$1" = "gun" ] || [ "$1" = "ranch" -a "$3" = "1.6" ]; then \
sed '1,/^$$$$/d' $$$$f | sed 's/xref:/link:..\//g' \
| sed 's/link:man:$1(7)/link:../g' \
| sed 's/\(link:man:[a-z0-9_]*\):/\1./g' \
diff --git a/_build/content/articles/ranch-1.6.0.asciidoc b/_build/content/articles/ranch-1.6.0.asciidoc
new file mode 100644
index 00000000..60472a67
--- /dev/null
+++ b/_build/content/articles/ranch-1.6.0.asciidoc
@@ -0,0 +1,40 @@
++++
+date = "2018-08-01T10:00:00+01:00"
+title = "Ranch 1.6"
+
++++
+
+Ranch `1.6.0` has been released!
+
+This release sees the introduction of a suspend/resume
+mechanism for the listeners which makes the listener
+close the listening socket and stop accepting new
+connections. Existing connections continue uninterrupted.
+
+This can be used to update the socket options of the
+listener, or to implement a graceful shutdown. To
+that end a function has also been added which allows
+waiting until connections reach a certain number.
+
+This release also introduces many changes to prepare
+for the transition to Ranch 2.0 that will be released
+in the coming months. The guide now features a section
+listing all upcoming changes in Ranch 2.0.
+
+The manual has been updated to provide a separate
+manual page per function and module, just like for
+the Gun and Cowboy manuals.
+
+A complete
+list of changes can be found in the migration guide:
+https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/[Migrating from Ranch 1.5 to 1.6].
+
+You can donate to this project via
+https://salt.bountysource.com/teams/ninenines[BountySource].
+These funds are used to pay for additional servers for
+testing. A new server was added last month and allows
+me to test with additional Linux distributions Alpine,
+CentOS and Debian. Thanks in advance!
+
+As usual, feedback is appreciated, and issues or
+questions should be sent via Github tickets. Thanks!
diff --git a/_build/data/projects/ranch.toml b/_build/data/projects/ranch.toml
index c1f97113..4978794a 100644
--- a/_build/data/projects/ranch.toml
+++ b/_build/data/projects/ranch.toml
@@ -3,8 +3,8 @@ catchphrase = "The holy cow of servers."
description = "Ranch is a socket acceptor pool for building awesome TCP and TLS servers."
name = "ranch"
repository = "https://github.com/ninenines/ranch"
-versions = ["1.5", "1.4", "1.3", "1.2"]
-branches = ["1.5.0", "1.4.0", "1.3.2", "1.2.1"]
+versions = ["1.6", "1.5", "1.4", "1.3", "1.2"]
+branches = ["master", "1.5.0", "1.4.0", "1.3.2", "1.2.1"]
has_source = true
has_guide = true
has_manual = true
diff --git a/articles/asciideck/index.html b/articles/asciideck/index.html
index 85046159..f1c08cb1 100644
--- a/articles/asciideck/index.html
+++ b/articles/asciideck/index.html
@@ -108,6 +108,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.0.0-pre.4/index.html b/articles/cowboy-2.0.0-pre.4/index.html
index 94e78a17..b260101a 100644
--- a/articles/cowboy-2.0.0-pre.4/index.html
+++ b/articles/cowboy-2.0.0-pre.4/index.html
@@ -127,6 +127,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.0.0-rc.1/index.html b/articles/cowboy-2.0.0-rc.1/index.html
index 79ca4a88..3fce8e3d 100644
--- a/articles/cowboy-2.0.0-rc.1/index.html
+++ b/articles/cowboy-2.0.0-rc.1/index.html
@@ -98,6 +98,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.0.0-rc.2/index.html b/articles/cowboy-2.0.0-rc.2/index.html
index c357fad0..5ec240cf 100644
--- a/articles/cowboy-2.0.0-rc.2/index.html
+++ b/articles/cowboy-2.0.0-rc.2/index.html
@@ -91,6 +91,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.0.0/index.html b/articles/cowboy-2.0.0/index.html
index 6c6d16c8..6fb23b56 100644
--- a/articles/cowboy-2.0.0/index.html
+++ b/articles/cowboy-2.0.0/index.html
@@ -97,6 +97,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.1.0/index.html b/articles/cowboy-2.1.0/index.html
index dcb223e7..3b1e2b7c 100644
--- a/articles/cowboy-2.1.0/index.html
+++ b/articles/cowboy-2.1.0/index.html
@@ -94,6 +94,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.2.0/index.html b/articles/cowboy-2.2.0/index.html
index f47b5a42..2cc41b00 100644
--- a/articles/cowboy-2.2.0/index.html
+++ b/articles/cowboy-2.2.0/index.html
@@ -92,6 +92,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.3.0/index.html b/articles/cowboy-2.3.0/index.html
index 08a864fd..334be95f 100644
--- a/articles/cowboy-2.3.0/index.html
+++ b/articles/cowboy-2.3.0/index.html
@@ -84,6 +84,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy-2.4.0/index.html b/articles/cowboy-2.4.0/index.html
index 5f3db281..ba541d47 100644
--- a/articles/cowboy-2.4.0/index.html
+++ b/articles/cowboy-2.4.0/index.html
@@ -86,6 +86,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/cowboy2-qs/index.html b/articles/cowboy2-qs/index.html
index 493418b4..a3502cb4 100644
--- a/articles/cowboy2-qs/index.html
+++ b/articles/cowboy2-qs/index.html
@@ -128,6 +128,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/dont-let-it-crash/index.html b/articles/dont-let-it-crash/index.html
index 6d69f403..b0bfe15c 100644
--- a/articles/dont-let-it-crash/index.html
+++ b/articles/dont-let-it-crash/index.html
@@ -103,6 +103,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/erlang-scalability/index.html b/articles/erlang-scalability/index.html
index 7bfd2995..af8b71f3 100644
--- a/articles/erlang-scalability/index.html
+++ b/articles/erlang-scalability/index.html
@@ -115,6 +115,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/erlang-validate-utf8/index.html b/articles/erlang-validate-utf8/index.html
index 467097e7..b003a339 100644
--- a/articles/erlang-validate-utf8/index.html
+++ b/articles/erlang-validate-utf8/index.html
@@ -231,6 +231,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/erlang.mk-and-relx/index.html b/articles/erlang.mk-and-relx/index.html
index 906e6040..f29b9c73 100644
--- a/articles/erlang.mk-and-relx/index.html
+++ b/articles/erlang.mk-and-relx/index.html
@@ -141,6 +141,10 @@ cowboy-0.8.5 erlydtl-0.7.0 ninenines-0.2.0 stdlib-1.19.1</pre></div></div>
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/erlanger-playbook-september-2015-update/index.html b/articles/erlanger-playbook-september-2015-update/index.html
index 4a154f12..ecdbb26f 100644
--- a/articles/erlanger-playbook-september-2015-update/index.html
+++ b/articles/erlanger-playbook-september-2015-update/index.html
@@ -86,6 +86,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/erlanger-playbook/index.html b/articles/erlanger-playbook/index.html
index 6ab6066e..c75aee55 100644
--- a/articles/erlanger-playbook/index.html
+++ b/articles/erlanger-playbook/index.html
@@ -119,6 +119,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/farwest-funded/index.html b/articles/farwest-funded/index.html
index 65624072..9362af7d 100644
--- a/articles/farwest-funded/index.html
+++ b/articles/farwest-funded/index.html
@@ -87,6 +87,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/gun-1.0.0-rc.1/index.html b/articles/gun-1.0.0-rc.1/index.html
index 9eda939b..5c1910bc 100644
--- a/articles/gun-1.0.0-rc.1/index.html
+++ b/articles/gun-1.0.0-rc.1/index.html
@@ -88,6 +88,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/gun-1.0.0/index.html b/articles/gun-1.0.0/index.html
index 56a98e7d..f697ab7e 100644
--- a/articles/gun-1.0.0/index.html
+++ b/articles/gun-1.0.0/index.html
@@ -87,6 +87,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/index.html b/articles/index.html
index 5867703d..62f18a65 100644
--- a/articles/index.html
+++ b/articles/index.html
@@ -67,6 +67,24 @@
<article class="blog_item">
<header>
+ <h2><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></h2>
+ <p class="date">
+ <span class="year">2018</span>
+ <span class="day-month">01 Aug</span>
+ </p>
+ </header>
+
+ <p>Ranch 1.6.0 has been released!
+This release sees the introduction of a suspend/resume mechanism for the listeners which makes the listener close the listening socket and stop accepting new connections. Existing connections continue uninterrupted.
+This can be used to update the socket options of the listener, or to implement a graceful shutdown. To that end a function has also been added which allows waiting until connections reach a certain number.</p>
+
+ <p style="text-align:right">
+ <a class="read_more" href="https://ninenines.eu/articles/ranch-1.6.0/">Read More</a>
+ </p>
+ </article>
+
+ <article class="blog_item">
+ <header>
<h2><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></h2>
<p class="date">
<span class="year">2018</span>
@@ -416,22 +434,6 @@ When looking into why the permessage-deflate tests in autobahntestsuite were tak
</p>
</article>
- <article class="blog_item">
- <header>
- <h2><a href="https://ninenines.eu/articles/on-open-source/">On open source</a></h2>
- <p class="date">
- <span class="year">2014</span>
- <span class="day-month">05 Sep</span>
- </p>
- </header>
-
- <p>Last week I read a great article on contributing to open source by Alvaro Videla. He makes many great points and I am in agreement with most of it. This made me want to properly explain my point of view with regard to open source and contributions. Unlike most open source evangelism articles I will not talk about ideals or any of that crap, but rather my personal feelings and experience.</p>
-
- <p style="text-align:right">
- <a class="read_more" href="https://ninenines.eu/articles/on-open-source/">Read More</a>
- </p>
- </article>
-
<nav class="pagination" role="pagination">
diff --git a/articles/index.xml b/articles/index.xml
index 472fd03b..a5f81f93 100644
--- a/articles/index.xml
+++ b/articles/index.xml
@@ -6,12 +6,23 @@
<description>Recent content in Articles on Nine Nines</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
- <lastBuildDate>Fri, 27 Jul 2018 10:00:00 +0100</lastBuildDate>
+ <lastBuildDate>Wed, 01 Aug 2018 10:00:00 +0100</lastBuildDate>
<atom:link href="https://ninenines.eu/articles/index.xml" rel="self" type="application/rss+xml" />
<item>
+ <title>Ranch 1.6</title>
+ <link>https://ninenines.eu/articles/ranch-1.6.0/</link>
+ <pubDate>Wed, 01 Aug 2018 10:00:00 +0100</pubDate>
+
+ <guid>https://ninenines.eu/articles/ranch-1.6.0/</guid>
+ <description>Ranch 1.6.0 has been released!
+This release sees the introduction of a suspend/resume mechanism for the listeners which makes the listener close the listening socket and stop accepting new connections. Existing connections continue uninterrupted.
+This can be used to update the socket options of the listener, or to implement a graceful shutdown. To that end a function has also been added which allows waiting until connections reach a certain number.</description>
+ </item>
+
+ <item>
<title>Gun 1.0</title>
<link>https://ninenines.eu/articles/gun-1.0.0/</link>
<pubDate>Fri, 27 Jul 2018 10:00:00 +0100</pubDate>
diff --git a/articles/january-2014-status/index.html b/articles/january-2014-status/index.html
index f2ccbed6..d1a6d381 100644
--- a/articles/january-2014-status/index.html
+++ b/articles/january-2014-status/index.html
@@ -113,6 +113,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/ml-archives/index.html b/articles/ml-archives/index.html
index 4c73d606..3d8b952b 100644
--- a/articles/ml-archives/index.html
+++ b/articles/ml-archives/index.html
@@ -84,6 +84,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/on-open-source/index.html b/articles/on-open-source/index.html
index d9d814c2..039b4410 100644
--- a/articles/on-open-source/index.html
+++ b/articles/on-open-source/index.html
@@ -96,6 +96,10 @@ much left to look at today</a>. This was followed by a <a href="https://github.c
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/page/2/index.html b/articles/page/2/index.html
index 8d005af8..27d318a3 100644
--- a/articles/page/2/index.html
+++ b/articles/page/2/index.html
@@ -67,6 +67,22 @@
<article class="blog_item">
<header>
+ <h2><a href="https://ninenines.eu/articles/on-open-source/">On open source</a></h2>
+ <p class="date">
+ <span class="year">2014</span>
+ <span class="day-month">05 Sep</span>
+ </p>
+ </header>
+
+ <p>Last week I read a great article on contributing to open source by Alvaro Videla. He makes many great points and I am in agreement with most of it. This made me want to properly explain my point of view with regard to open source and contributions. Unlike most open source evangelism articles I will not talk about ideals or any of that crap, but rather my personal feelings and experience.</p>
+
+ <p style="text-align:right">
+ <a class="read_more" href="https://ninenines.eu/articles/on-open-source/">Read More</a>
+ </p>
+ </article>
+
+ <article class="blog_item">
+ <header>
<h2><a href="https://ninenines.eu/articles/the-story-so-far/">The story so far</a></h2>
<p class="date">
<span class="year">2014</span>
diff --git a/articles/ranch-1.3/index.html b/articles/ranch-1.3/index.html
index 8cfc4671..da972fec 100644
--- a/articles/ranch-1.3/index.html
+++ b/articles/ranch-1.3/index.html
@@ -125,6 +125,10 @@ Primary key fingerprint<font color="#990000">:</font> F19F 189C ECC7 <font color
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/ranch-1.6.0/index.html b/articles/ranch-1.6.0/index.html
new file mode 100644
index 00000000..9057274d
--- /dev/null
+++ b/articles/ranch-1.6.0/index.html
@@ -0,0 +1,262 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Ranch 1.6</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" 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 class="active"><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents">
+<div class="container">
+<div class="row">
+<div class="span9 maincol">
+
+<article class="blog_item">
+<header>
+ <h1 class="lined-header"><span>Ranch 1.6</span></h1>
+ <p class="date">
+ <span class="year">2018</span>
+ <span class="day-month">01 Aug</span>
+ </p>
+</header>
+
+<p>Ranch <code>1.6.0</code> has been released!</p>
+<p>This release sees the introduction of a suspend/resume mechanism for the listeners which makes the listener close the listening socket and stop accepting new connections. Existing connections continue uninterrupted.</p>
+<p>This can be used to update the socket options of the listener, or to implement a graceful shutdown. To that end a function has also been added which allows waiting until connections reach a certain number.</p>
+<p>This release also introduces many changes to prepare for the transition to Ranch 2.0 that will be released in the coming months. The guide now features a section listing all upcoming changes in Ranch 2.0.</p>
+<p>The manual has been updated to provide a separate manual page per function and module, just like for the Gun and Cowboy manuals.</p>
+<p>A complete list of changes can be found in the migration guide: <a href="https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/">Migrating from Ranch 1.5 to 1.6</a>.</p>
+<p>You can donate to this project via <a href="https://salt.bountysource.com/teams/ninenines">BountySource</a>. These funds are used to pay for additional servers for testing. A new server was added last month and allows me to test with additional Linux distributions Alpine, CentOS and Debian. Thanks in advance!</p>
+<p>As usual, feedback is appreciated, and issues or questions should be sent via Github tickets. Thanks!</p>
+
+
+</article>
+</div>
+
+<div class="span3 sidecol">
+<h3>More articles</h3>
+<ul id="articles-nav" class="extra_margin">
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/asciideck/">Asciideck: Asciidoc for Erlang</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-1.0.0-rc.1/">Gun 1.0 release candidate 1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.4.0/">Cowboy 2.4</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.3.0/">Cowboy 2.3</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.2.0/">Cowboy 2.2</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.1.0/">Cowboy 2.1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0/">Cowboy 2.0</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0-rc.2/">Cowboy 2.0 release candidate 2</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0-rc.1/">Cowboy 2.0 release candidate 1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/the-elephant-in-the-room/">The elephant in the room</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/dont-let-it-crash/">Don&#39;t let it crash</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0-pre.4/">Cowboy 2.0 pre-release 4</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-1.3/">Ranch 1.3</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ml-archives/">Mailing list archived</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/website-update/">Website update</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlanger-playbook-september-2015-update/">The Erlanger Playbook September 2015 Update</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlanger-playbook/">The Erlanger Playbook</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang-validate-utf8/">Validating UTF-8 binaries with Erlang</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/on-open-source/">On open source</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/the-story-so-far/">The story so far</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy2-qs/">Cowboy 2.0 and query strings</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/january-2014-status/">January 2014 status</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/farwest-funded/">Farwest got funded!</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang.mk-and-relx/">Build Erlang releases with Erlang.mk and Relx</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.5-intermediate-module/">Xerl: intermediate module</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.4-expression-separator/">Xerl: expression separator</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang-scalability/">Erlang Scalability</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.3-atomic-expressions/">Xerl: atomic expressions</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.2-two-modules/">Xerl: two modules</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.1-empty-modules/">Xerl: empty modules</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-ftp/">Build an FTP Server with Ranch in 30 Minutes</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/tictactoe/">Erlang Tic Tac Toe</a></li>
+
+
+
+
+</ul>
+
+<h3>Feedback</h3>
+<p>Feel free to <a href="mailto:[email protected]">email us</a>
+if you found any mistake or need clarification on any of the
+articles.</p>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
diff --git a/articles/ranch-ftp/index.html b/articles/ranch-ftp/index.html
index 9ef39aa3..f942d51e 100644
--- a/articles/ranch-ftp/index.html
+++ b/articles/ranch-ftp/index.html
@@ -227,6 +227,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/the-elephant-in-the-room/index.html b/articles/the-elephant-in-the-room/index.html
index 160b7dfe..3c9bcf04 100644
--- a/articles/the-elephant-in-the-room/index.html
+++ b/articles/the-elephant-in-the-room/index.html
@@ -109,6 +109,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/the-story-so-far/index.html b/articles/the-story-so-far/index.html
index 3a05e2fe..40cf20fc 100644
--- a/articles/the-story-so-far/index.html
+++ b/articles/the-story-so-far/index.html
@@ -100,6 +100,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/tictactoe/index.html b/articles/tictactoe/index.html
index 92740322..3023f8a1 100644
--- a/articles/tictactoe/index.html
+++ b/articles/tictactoe/index.html
@@ -132,6 +132,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/website-update/index.html b/articles/website-update/index.html
index a1861b86..66b17c01 100644
--- a/articles/website-update/index.html
+++ b/articles/website-update/index.html
@@ -89,6 +89,10 @@
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/xerl-0.1-empty-modules/index.html b/articles/xerl-0.1-empty-modules/index.html
index ecf48c2d..3a0c70c5 100644
--- a/articles/xerl-0.1-empty-modules/index.html
+++ b/articles/xerl-0.1-empty-modules/index.html
@@ -167,6 +167,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/xerl-0.2-two-modules/index.html b/articles/xerl-0.2-two-modules/index.html
index c0906648..f8b6f89d 100644
--- a/articles/xerl-0.2-two-modules/index.html
+++ b/articles/xerl-0.2-two-modules/index.html
@@ -195,6 +195,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/xerl-0.3-atomic-expressions/index.html b/articles/xerl-0.3-atomic-expressions/index.html
index 3e107101..3ab45390 100644
--- a/articles/xerl-0.3-atomic-expressions/index.html
+++ b/articles/xerl-0.3-atomic-expressions/index.html
@@ -164,6 +164,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/xerl-0.4-expression-separator/index.html b/articles/xerl-0.4-expression-separator/index.html
index 07305f37..8917fc27 100644
--- a/articles/xerl-0.4-expression-separator/index.html
+++ b/articles/xerl-0.4-expression-separator/index.html
@@ -116,6 +116,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/articles/xerl-0.5-intermediate-module/index.html b/articles/xerl-0.5-intermediate-module/index.html
index f99c1cee..87e55d04 100644
--- a/articles/xerl-0.5-intermediate-module/index.html
+++ b/articles/xerl-0.5-intermediate-module/index.html
@@ -160,6 +160,10 @@ http://www.gnu.org/software/src-highlite -->
<ul id="articles-nav" class="extra_margin">
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
diff --git a/docs/en/ranch/1.2/guide/embedded/index.html b/docs/en/ranch/1.2/guide/embedded/index.html
index e93fd8ad..be5d3087 100644
--- a/docs/en/ranch/1.2/guide/embedded/index.html
+++ b/docs/en/ranch/1.2/guide/embedded/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/index.html b/docs/en/ranch/1.2/guide/index.html
index d7f2fda3..0cf435fc 100644
--- a/docs/en/ranch/1.2/guide/index.html
+++ b/docs/en/ranch/1.2/guide/index.html
@@ -114,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/internals/index.html b/docs/en/ranch/1.2/guide/internals/index.html
index a51198df..2bd5e9a1 100644
--- a/docs/en/ranch/1.2/guide/internals/index.html
+++ b/docs/en/ranch/1.2/guide/internals/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/introduction/index.html b/docs/en/ranch/1.2/guide/introduction/index.html
index 559884a9..33c7bdcf 100644
--- a/docs/en/ranch/1.2/guide/introduction/index.html
+++ b/docs/en/ranch/1.2/guide/introduction/index.html
@@ -125,6 +125,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/listeners/index.html b/docs/en/ranch/1.2/guide/listeners/index.html
index 7543fd70..06778691 100644
--- a/docs/en/ranch/1.2/guide/listeners/index.html
+++ b/docs/en/ranch/1.2/guide/listeners/index.html
@@ -280,6 +280,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/parsers/index.html b/docs/en/ranch/1.2/guide/parsers/index.html
index 37a1f7b5..bfb5b074 100644
--- a/docs/en/ranch/1.2/guide/parsers/index.html
+++ b/docs/en/ranch/1.2/guide/parsers/index.html
@@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/protocols/index.html b/docs/en/ranch/1.2/guide/protocols/index.html
index 0055885a..cabb24b5 100644
--- a/docs/en/ranch/1.2/guide/protocols/index.html
+++ b/docs/en/ranch/1.2/guide/protocols/index.html
@@ -210,6 +210,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
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 08b5daca..5e87d7df 100644
--- a/docs/en/ranch/1.2/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.2/guide/ssl_auth/index.html
@@ -194,6 +194,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/guide/transports/index.html b/docs/en/ranch/1.2/guide/transports/index.html
index beaaf8d2..e7b4ff58 100644
--- a/docs/en/ranch/1.2/guide/transports/index.html
+++ b/docs/en/ranch/1.2/guide/transports/index.html
@@ -226,6 +226,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.2/manual/index.html b/docs/en/ranch/1.2/manual/index.html
index 2a110b2b..5bb016fc 100644
--- a/docs/en/ranch/1.2/manual/index.html
+++ b/docs/en/ranch/1.2/manual/index.html
@@ -110,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.2/manual/ranch/index.html b/docs/en/ranch/1.2/manual/ranch/index.html
index 3a54fc99..4959ed9a 100644
--- a/docs/en/ranch/1.2/manual/ranch/index.html
+++ b/docs/en/ranch/1.2/manual/ranch/index.html
@@ -265,6 +265,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
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 0295e316..f2c26be8 100644
--- a/docs/en/ranch/1.2/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_app/index.html
@@ -109,6 +109,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
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 b90a7cf8..b6363509 100644
--- a/docs/en/ranch/1.2/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_protocol/index.html
@@ -123,6 +123,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
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 b2f16f68..b1036e5e 100644
--- a/docs/en/ranch/1.2/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_ssl/index.html
@@ -248,6 +248,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
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 894ce850..3c0de70a 100644
--- a/docs/en/ranch/1.2/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_tcp/index.html
@@ -213,6 +213,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
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 cea0ac4d..e264d89d 100644
--- a/docs/en/ranch/1.2/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_transport/index.html
@@ -288,6 +288,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/embedded/index.html b/docs/en/ranch/1.3/guide/embedded/index.html
index 10e415f1..188d4ffc 100644
--- a/docs/en/ranch/1.3/guide/embedded/index.html
+++ b/docs/en/ranch/1.3/guide/embedded/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/index.html b/docs/en/ranch/1.3/guide/index.html
index 6706a466..2ac63059 100644
--- a/docs/en/ranch/1.3/guide/index.html
+++ b/docs/en/ranch/1.3/guide/index.html
@@ -114,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/internals/index.html b/docs/en/ranch/1.3/guide/internals/index.html
index d8b694d2..4c34b031 100644
--- a/docs/en/ranch/1.3/guide/internals/index.html
+++ b/docs/en/ranch/1.3/guide/internals/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/introduction/index.html b/docs/en/ranch/1.3/guide/introduction/index.html
index 7072cc40..d0e64e5d 100644
--- a/docs/en/ranch/1.3/guide/introduction/index.html
+++ b/docs/en/ranch/1.3/guide/introduction/index.html
@@ -126,6 +126,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/listeners/index.html b/docs/en/ranch/1.3/guide/listeners/index.html
index 3d7d5e48..e0333ce9 100644
--- a/docs/en/ranch/1.3/guide/listeners/index.html
+++ b/docs/en/ranch/1.3/guide/listeners/index.html
@@ -312,6 +312,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/parsers/index.html b/docs/en/ranch/1.3/guide/parsers/index.html
index 4147e76d..6409f8c1 100644
--- a/docs/en/ranch/1.3/guide/parsers/index.html
+++ b/docs/en/ranch/1.3/guide/parsers/index.html
@@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/protocols/index.html b/docs/en/ranch/1.3/guide/protocols/index.html
index 24822dc0..7d3112be 100644
--- a/docs/en/ranch/1.3/guide/protocols/index.html
+++ b/docs/en/ranch/1.3/guide/protocols/index.html
@@ -188,6 +188,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/ssl_auth/index.html b/docs/en/ranch/1.3/guide/ssl_auth/index.html
index ba0a22dd..5bf00215 100644
--- a/docs/en/ranch/1.3/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.3/guide/ssl_auth/index.html
@@ -194,6 +194,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/guide/transports/index.html b/docs/en/ranch/1.3/guide/transports/index.html
index 6d290cf1..25602d70 100644
--- a/docs/en/ranch/1.3/guide/transports/index.html
+++ b/docs/en/ranch/1.3/guide/transports/index.html
@@ -219,6 +219,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/index.html b/docs/en/ranch/1.3/manual/index.html
index e3ba0a20..c5d4fa6b 100644
--- a/docs/en/ranch/1.3/manual/index.html
+++ b/docs/en/ranch/1.3/manual/index.html
@@ -110,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch/index.html b/docs/en/ranch/1.3/manual/ranch/index.html
index d9ddfc32..f2053c3c 100644
--- a/docs/en/ranch/1.3/manual/ranch/index.html
+++ b/docs/en/ranch/1.3/manual/ranch/index.html
@@ -318,6 +318,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_app/index.html b/docs/en/ranch/1.3/manual/ranch_app/index.html
index d5d71da5..4a52598b 100644
--- a/docs/en/ranch/1.3/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_app/index.html
@@ -108,6 +108,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_protocol/index.html b/docs/en/ranch/1.3/manual/ranch_protocol/index.html
index da267c1b..8a547cfb 100644
--- a/docs/en/ranch/1.3/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_protocol/index.html
@@ -123,6 +123,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_ssl/index.html b/docs/en/ranch/1.3/manual/ranch_ssl/index.html
index f76a7e4c..9e4a56a5 100644
--- a/docs/en/ranch/1.3/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_ssl/index.html
@@ -264,6 +264,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_tcp/index.html b/docs/en/ranch/1.3/manual/ranch_tcp/index.html
index 14879474..0cd51b64 100644
--- a/docs/en/ranch/1.3/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_tcp/index.html
@@ -217,6 +217,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_transport/index.html b/docs/en/ranch/1.3/manual/ranch_transport/index.html
index 0a75ac0d..665ef3df 100644
--- a/docs/en/ranch/1.3/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_transport/index.html
@@ -288,6 +288,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/embedded/index.html b/docs/en/ranch/1.4/guide/embedded/index.html
index b614e31e..ff317a8f 100644
--- a/docs/en/ranch/1.4/guide/embedded/index.html
+++ b/docs/en/ranch/1.4/guide/embedded/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/index.html b/docs/en/ranch/1.4/guide/index.html
index cff7d073..4f58d0c1 100644
--- a/docs/en/ranch/1.4/guide/index.html
+++ b/docs/en/ranch/1.4/guide/index.html
@@ -114,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/internals/index.html b/docs/en/ranch/1.4/guide/internals/index.html
index a194085e..1b6696f9 100644
--- a/docs/en/ranch/1.4/guide/internals/index.html
+++ b/docs/en/ranch/1.4/guide/internals/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/introduction/index.html b/docs/en/ranch/1.4/guide/introduction/index.html
index eb9fc715..184c564f 100644
--- a/docs/en/ranch/1.4/guide/introduction/index.html
+++ b/docs/en/ranch/1.4/guide/introduction/index.html
@@ -126,6 +126,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/listeners/index.html b/docs/en/ranch/1.4/guide/listeners/index.html
index c2c2b1c8..4cbbdbae 100644
--- a/docs/en/ranch/1.4/guide/listeners/index.html
+++ b/docs/en/ranch/1.4/guide/listeners/index.html
@@ -325,6 +325,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/parsers/index.html b/docs/en/ranch/1.4/guide/parsers/index.html
index f201afc3..2218f278 100644
--- a/docs/en/ranch/1.4/guide/parsers/index.html
+++ b/docs/en/ranch/1.4/guide/parsers/index.html
@@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/protocols/index.html b/docs/en/ranch/1.4/guide/protocols/index.html
index 63dbe28a..424f7ba3 100644
--- a/docs/en/ranch/1.4/guide/protocols/index.html
+++ b/docs/en/ranch/1.4/guide/protocols/index.html
@@ -188,6 +188,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/ssl_auth/index.html b/docs/en/ranch/1.4/guide/ssl_auth/index.html
index d7b16352..8a3f3aed 100644
--- a/docs/en/ranch/1.4/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.4/guide/ssl_auth/index.html
@@ -194,6 +194,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/guide/transports/index.html b/docs/en/ranch/1.4/guide/transports/index.html
index 788d938e..34cca5d8 100644
--- a/docs/en/ranch/1.4/guide/transports/index.html
+++ b/docs/en/ranch/1.4/guide/transports/index.html
@@ -219,6 +219,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/index.html b/docs/en/ranch/1.4/manual/index.html
index 626ad426..1ebea3bd 100644
--- a/docs/en/ranch/1.4/manual/index.html
+++ b/docs/en/ranch/1.4/manual/index.html
@@ -110,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch/index.html b/docs/en/ranch/1.4/manual/ranch/index.html
index f10e215c..99d7576c 100644
--- a/docs/en/ranch/1.4/manual/ranch/index.html
+++ b/docs/en/ranch/1.4/manual/ranch/index.html
@@ -322,6 +322,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_app/index.html b/docs/en/ranch/1.4/manual/ranch_app/index.html
index 0a9fea30..ba8158b6 100644
--- a/docs/en/ranch/1.4/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_app/index.html
@@ -108,6 +108,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_protocol/index.html b/docs/en/ranch/1.4/manual/ranch_protocol/index.html
index d4cbdfc5..e19a8525 100644
--- a/docs/en/ranch/1.4/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_protocol/index.html
@@ -123,6 +123,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_ssl/index.html b/docs/en/ranch/1.4/manual/ranch_ssl/index.html
index 5f2f51a0..60923448 100644
--- a/docs/en/ranch/1.4/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_ssl/index.html
@@ -264,6 +264,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_tcp/index.html b/docs/en/ranch/1.4/manual/ranch_tcp/index.html
index b19871b5..5a41595b 100644
--- a/docs/en/ranch/1.4/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_tcp/index.html
@@ -217,6 +217,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_transport/index.html b/docs/en/ranch/1.4/manual/ranch_transport/index.html
index e6296d99..70d2cb39 100644
--- a/docs/en/ranch/1.4/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_transport/index.html
@@ -288,6 +288,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/embedded/index.html b/docs/en/ranch/1.5/guide/embedded/index.html
index 3fe4bd66..6953e668 100644
--- a/docs/en/ranch/1.5/guide/embedded/index.html
+++ b/docs/en/ranch/1.5/guide/embedded/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/index.html b/docs/en/ranch/1.5/guide/index.html
index 97f99c01..978f729d 100644
--- a/docs/en/ranch/1.5/guide/index.html
+++ b/docs/en/ranch/1.5/guide/index.html
@@ -114,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/internals/index.html b/docs/en/ranch/1.5/guide/internals/index.html
index bce02197..34aeaa00 100644
--- a/docs/en/ranch/1.5/guide/internals/index.html
+++ b/docs/en/ranch/1.5/guide/internals/index.html
@@ -142,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/introduction/index.html b/docs/en/ranch/1.5/guide/introduction/index.html
index 59e97f62..27d4ffff 100644
--- a/docs/en/ranch/1.5/guide/introduction/index.html
+++ b/docs/en/ranch/1.5/guide/introduction/index.html
@@ -126,6 +126,8 @@
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/listeners/index.html b/docs/en/ranch/1.5/guide/listeners/index.html
index 7195a56d..46533670 100644
--- a/docs/en/ranch/1.5/guide/listeners/index.html
+++ b/docs/en/ranch/1.5/guide/listeners/index.html
@@ -325,6 +325,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/parsers/index.html b/docs/en/ranch/1.5/guide/parsers/index.html
index 16d0bd55..4b19596a 100644
--- a/docs/en/ranch/1.5/guide/parsers/index.html
+++ b/docs/en/ranch/1.5/guide/parsers/index.html
@@ -181,6 +181,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/protocols/index.html b/docs/en/ranch/1.5/guide/protocols/index.html
index 45198405..a9609445 100644
--- a/docs/en/ranch/1.5/guide/protocols/index.html
+++ b/docs/en/ranch/1.5/guide/protocols/index.html
@@ -188,6 +188,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/ssl_auth/index.html b/docs/en/ranch/1.5/guide/ssl_auth/index.html
index d9053010..11a80471 100644
--- a/docs/en/ranch/1.5/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.5/guide/ssl_auth/index.html
@@ -194,6 +194,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/guide/transports/index.html b/docs/en/ranch/1.5/guide/transports/index.html
index 0aed886d..1fb20767 100644
--- a/docs/en/ranch/1.5/guide/transports/index.html
+++ b/docs/en/ranch/1.5/guide/transports/index.html
@@ -219,6 +219,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/index.html b/docs/en/ranch/1.5/manual/index.html
index c41a1168..2e36042d 100644
--- a/docs/en/ranch/1.5/manual/index.html
+++ b/docs/en/ranch/1.5/manual/index.html
@@ -110,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/ranch/index.html b/docs/en/ranch/1.5/manual/ranch/index.html
index 51fd0a2a..1a38bc6b 100644
--- a/docs/en/ranch/1.5/manual/ranch/index.html
+++ b/docs/en/ranch/1.5/manual/ranch/index.html
@@ -322,6 +322,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/ranch_app/index.html b/docs/en/ranch/1.5/manual/ranch_app/index.html
index d3828b73..dadbc0f5 100644
--- a/docs/en/ranch/1.5/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.5/manual/ranch_app/index.html
@@ -108,6 +108,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/ranch_protocol/index.html b/docs/en/ranch/1.5/manual/ranch_protocol/index.html
index cf2bbf23..33a295af 100644
--- a/docs/en/ranch/1.5/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.5/manual/ranch_protocol/index.html
@@ -123,6 +123,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/ranch_ssl/index.html b/docs/en/ranch/1.5/manual/ranch_ssl/index.html
index 84e8dc20..fc7097ac 100644
--- a/docs/en/ranch/1.5/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.5/manual/ranch_ssl/index.html
@@ -264,6 +264,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/ranch_tcp/index.html b/docs/en/ranch/1.5/manual/ranch_tcp/index.html
index b2c559b4..9071665b 100644
--- a/docs/en/ranch/1.5/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.5/manual/ranch_tcp/index.html
@@ -217,6 +217,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.5/manual/ranch_transport/index.html b/docs/en/ranch/1.5/manual/ranch_transport/index.html
index 81a37ece..803301e5 100644
--- a/docs/en/ranch/1.5/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.5/manual/ranch_transport/index.html
@@ -321,6 +321,8 @@
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
<li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
diff --git a/docs/en/ranch/1.6/guide/embedded.asciidoc b/docs/en/ranch/1.6/guide/embedded.asciidoc
new file mode 100644
index 00000000..55c018b1
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/embedded.asciidoc
@@ -0,0 +1,48 @@
+== Embedded mode
+
+Embedded mode allows you to insert Ranch listeners directly
+in your supervision tree. This allows for greater fault tolerance
+control by permitting the shutdown of a listener due to the
+failure of another part of the application and vice versa.
+
+=== Embedding
+
+To embed Ranch in your application you can simply add the child specs
+to your supervision tree. This can all be done in the `init/1` function
+of one of your application supervisors.
+
+Ranch requires at the minimum two kinds of child specs for embedding.
+First, you need to add `ranch_sup` to your supervision tree, only once,
+regardless of the number of listeners you will use. Then you need to
+add the child specs for each listener.
+
+Ranch has a convenience function for getting the listeners child specs
+called `ranch:child_spec/5`, that works like `ranch:start_listener/5`,
+except that it doesn't start anything, it only returns child specs.
+
+As for `ranch_sup`, the child spec is simple enough to not require a
+convenience function.
+
+The following example adds both `ranch_sup` and one listener to another
+application's supervision tree.
+
+.Embed Ranch directly in your supervision tree
+
+[source,erlang]
+----
+init([]) ->
+ RanchSupSpec = {ranch_sup, {ranch_sup, start_link, []},
+ permanent, 5000, supervisor, [ranch_sup]},
+ ListenerSpec = ranch:child_spec(echo, 100,
+ ranch_tcp, [{port, 5555}],
+ echo_protocol, []
+ ),
+ {ok, {{one_for_one, 10, 10}, [RanchSupSpec, ListenerSpec]}}.
+----
+
+Remember, you can add as many listener child specs as needed, but only
+one `ranch_sup` spec!
+
+It is recommended that your architecture makes sure that all listeners
+are restarted if `ranch_sup` fails. See the Ranch internals chapter for
+more details on how Ranch does it.
diff --git a/docs/en/ranch/1.6/guide/embedded/index.html b/docs/en/ranch/1.6/guide/embedded/index.html
new file mode 100644
index 00000000..12d08d25
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/embedded/index.html
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Embedded mode</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Embedded mode</span></h1>
+
+<p>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.</p>
+<h2 id="_embedding">Embedding</h2>
+<p>To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the <code>init/1</code> function of one of your application supervisors.</p>
+<p>Ranch requires at the minimum two kinds of child specs for embedding. First, you need to add <code>ranch_sup</code> to your supervision tree, only once, regardless of the number of listeners you will use. Then you need to add the child specs for each listener.</p>
+<p>Ranch has a convenience function for getting the listeners child specs called <code>ranch:child_spec/5</code>, that works like <code>ranch:start_listener/5</code>, except that it doesn&apos;t start anything, it only returns child specs.</p>
+<p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a convenience function.</p>
+<p>The following example adds both <code>ranch_sup</code> and one listener to another application&apos;s supervision tree.</p>
+<div class="listingblock"><div class="title">Embed Ranch directly in your supervision tree</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><b><font color="#000000">init</font></b>([]) <font color="#990000">-&gt;</font>
+ <font color="#009900">RanchSupSpec</font> <font color="#990000">=</font> {<font color="#FF6600">ranch_sup</font>, {<font color="#FF6600">ranch_sup</font>, <font color="#FF6600">start_link</font>, []},
+ <font color="#FF6600">permanent</font>, <font color="#993399">5000</font>, <font color="#FF6600">supervisor</font>, [<font color="#FF6600">ranch_sup</font>]},
+ <font color="#009900">ListenerSpec</font> <font color="#990000">=</font> <b><font color="#000000">ranch:child_spec</font></b>(<font color="#FF6600">echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+ ),
+ {<font color="#FF6600">ok</font>, {{<font color="#FF6600">one_for_one</font>, <font color="#993399">10</font>, <font color="#993399">10</font>}, [<font color="#009900">RanchSupSpec</font>, <font color="#009900">ListenerSpec</font>]}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Remember, you can add as many listener child specs as needed, but only one <code>ranch_sup</code> spec!</p>
+<p>It is recommended that your architecture makes sure that all listeners are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for more details on how Ranch does it.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/">
+ Protocols
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/">
+ Writing parsers
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/index.html b/docs/en/ranch/1.6/guide/index.html
new file mode 100644
index 00000000..d43b65f6
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/index.html
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Ranch User Guide</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Ranch User Guide</span></h1>
+
+<h2 id="_interface">Interface</h2>
+<ul><li><a href="introduction/">Introduction</a>
+</li>
+<li><a href="listeners/">Listeners</a>
+</li>
+<li><a href="transports/">Transports</a>
+</li>
+<li><a href="protocols/">Protocols</a>
+</li>
+<li><a href="embedded/">Embedded mode</a>
+</li>
+</ul>
+<h2 id="_how_to">How to</h2>
+<ul><li><a href="parsers/">Writing parsers</a>
+</li>
+<li><a href="ssl_auth/">SSL client authentication</a>
+</li>
+</ul>
+<h2 id="_advanced">Advanced</h2>
+<ul><li><a href="internals/">Internals</a>
+</li>
+</ul>
+<h2 id="_additional_information">Additional information</h2>
+<ul><li><a href="upcoming_2.0_changes/">Upcoming changes in Ranch 2.0</a>
+</li>
+<li><a href="migrating_from_1.5/">Migrating from Ranch 1.5 to 1.6</a>
+</li>
+<li><a href="migrating_from_1.x/">Migrating from Ranch 1.x</a>
+</li>
+</ul>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/internals.asciidoc b/docs/en/ranch/1.6/guide/internals.asciidoc
new file mode 100644
index 00000000..c5bde58f
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/internals.asciidoc
@@ -0,0 +1,94 @@
+== Internals
+
+This chapter may not apply to embedded Ranch as embedding allows you
+to use an architecture specific to your application, which may or may
+not be compatible with the description of the Ranch application.
+
+Note that for everything related to efficiency and performance,
+you should perform the benchmarks yourself to get the numbers that
+matter to you. Generic benchmarks found on the web may or may not
+be of use to you, you can never know until you benchmark your own
+system.
+
+=== Architecture
+
+Ranch is an OTP application.
+
+Like all OTP applications, Ranch has a top supervisor. It is responsible
+for supervising the `ranch_server` process and all the listeners that
+will be started.
+
+The `ranch_server` gen_server is a central process keeping track of the
+listeners and their acceptors. It does so through the use of a public ets
+table called `ranch_server`. The table is owned by the top supervisor
+to improve fault tolerance. This way if the `ranch_server` gen_server
+fails, it doesn't lose any information and the restarted process can
+continue as if nothing happened.
+
+Ranch uses a custom supervisor for managing connections. This supervisor
+keeps track of the number of connections and handles connection limits
+directly. While it is heavily optimized to perform the task of creating
+connection processes for accepted connections, it is still following the
+OTP principles and the usual `sys` and `supervisor` calls will work on
+it as expected.
+
+Listeners are grouped into the `ranch_listener_sup` supervisor and
+consist of three kinds of processes: the listener gen_server, the
+acceptor processes and the connection processes, both grouped under
+their own supervisor. All of these processes are registered to the
+`ranch_server` gen_server with varying amount of information.
+
+All socket operations, including listening for connections, go through
+transport handlers. Accepted connections are given to the protocol handler.
+Transport handlers are simple callback modules for performing operations on
+sockets. Protocol handlers start a new process, which receives socket
+ownership, with no requirements on how the code should be written inside
+that new process.
+
+=== Number of acceptors
+
+The second argument to `ranch:start_listener/5` is the number of
+processes that will be accepting connections. Care should be taken
+when choosing this number.
+
+First of all, it should not be confused with the maximum number
+of connections. Acceptor processes are only used for accepting and
+have nothing else in common with connection processes. Therefore
+there is nothing to be gained from setting this number too high,
+in fact it can slow everything else down.
+
+Second, this number should be high enough to allow Ranch to accept
+connections concurrently. But the number of cores available doesn't
+seem to be the only factor for choosing this number, as we can
+observe faster accepts if we have more acceptors than cores. It
+might be entirely dependent on the protocol, however.
+
+Our observations suggest that using 100 acceptors on modern hardware
+is a good solution, as it's big enough to always have acceptors ready
+and it's low enough that it doesn't have a negative impact on the
+system's performances.
+
+=== Platform-specific TCP features
+
+Some socket options are platform-specific and not supported by `inet`.
+They can be of interest because they generally are related to
+optimizations provided by the underlying OS. They can still be enabled
+thanks to the `raw` option, for which we will see an example.
+
+One of these features is `TCP_DEFER_ACCEPT` on Linux. It is a simplified
+accept mechanism which will wait for application data to come in before
+handing out the connection to the Erlang process.
+
+This is especially useful if you expect many connections to be mostly
+idle, perhaps part of a connection pool. They can be handled by the
+kernel directly until they send any real data, instead of allocating
+resources to idle connections.
+
+To enable this mechanism, the following option can be used.
+
+.Using raw transport options
+
+[source,erlang]
+{raw, 6, 9, << 30:32/native >>}
+
+It means go on layer 6, turn on option 9 with the given integer parameter.
diff --git a/docs/en/ranch/1.6/guide/internals/index.html b/docs/en/ranch/1.6/guide/internals/index.html
new file mode 100644
index 00000000..9b525aa6
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/internals/index.html
@@ -0,0 +1,190 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Internals</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Internals</span></h1>
+
+<p>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.</p>
+<p>Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</p>
+<h2 id="_architecture">Architecture</h2>
+<p>Ranch is an OTP application.</p>
+<p>Like all OTP applications, Ranch has a top supervisor. It is responsible for supervising the <code>ranch_server</code> process and all the listeners that will be started.</p>
+<p>The <code>ranch_server</code> gen_server is a central process keeping track of the listeners and their acceptors. It does so through the use of a public ets table called <code>ranch_server</code>. The table is owned by the top supervisor to improve fault tolerance. This way if the <code>ranch_server</code> gen_server fails, it doesn&apos;t lose any information and the restarted process can continue as if nothing happened.</p>
+<p>Ranch uses a custom supervisor for managing connections. This supervisor keeps track of the number of connections and handles connection limits directly. While it is heavily optimized to perform the task of creating connection processes for accepted connections, it is still following the OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on it as expected.</p>
+<p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and consist of three kinds of processes: the listener gen_server, the acceptor processes and the connection processes, both grouped under their own supervisor. All of these processes are registered to the <code>ranch_server</code> gen_server with varying amount of information.</p>
+<p>All socket operations, including listening for connections, go through transport handlers. Accepted connections are given to the protocol handler. Transport handlers are simple callback modules for performing operations on sockets. Protocol handlers start a new process, which receives socket ownership, with no requirements on how the code should be written inside that new process.</p>
+<h2 id="_number_of_acceptors">Number of acceptors</h2>
+<p>The second argument to <code>ranch:start_listener/5</code> is the number of processes that will be accepting connections. Care should be taken when choosing this number.</p>
+<p>First of all, it should not be confused with the maximum number of connections. Acceptor processes are only used for accepting and have nothing else in common with connection processes. Therefore there is nothing to be gained from setting this number too high, in fact it can slow everything else down.</p>
+<p>Second, this number should be high enough to allow Ranch to accept connections concurrently. But the number of cores available doesn&apos;t seem to be the only factor for choosing this number, as we can observe faster accepts if we have more acceptors than cores. It might be entirely dependent on the protocol, however.</p>
+<p>Our observations suggest that using 100 acceptors on modern hardware is a good solution, as it&apos;s big enough to always have acceptors ready and it&apos;s low enough that it doesn&apos;t have a negative impact on the system&apos;s performances.</p>
+<h2 id="_platform_specific_tcp_features">Platform-specific TCP features</h2>
+<p>Some socket options are platform-specific and not supported by <code>inet</code>. They can be of interest because they generally are related to optimizations provided by the underlying OS. They can still be enabled thanks to the <code>raw</code> option, for which we will see an example.</p>
+<p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified accept mechanism which will wait for application data to come in before handing out the connection to the Erlang process.</p>
+<p>This is especially useful if you expect many connections to be mostly idle, perhaps part of a connection pool. They can be handled by the kernel directly until they send any real data, instead of allocating resources to idle connections.</p>
+<p>To enable this mechanism, the following option can be used.</p>
+<div class="listingblock"><div class="title">Using raw transport options</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>{<font color="#FF6600">raw</font>, <font color="#993399">6</font>, <font color="#993399">9</font>, <font color="#990000">&lt;&lt;</font> <b><font color="#000000">30:32</font></b><font color="#990000">/</font><font color="#FF6600">native</font> <font color="#990000">&gt;&gt;</font>}</tt></pre>
+</div></div>
+<p>It means go on layer 6, turn on option 9 with the given integer parameter.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/">
+ SSL client authentication
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/">
+ Upcoming changes in Ranch 2.0
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/introduction.asciidoc b/docs/en/ranch/1.6/guide/introduction.asciidoc
new file mode 100644
index 00000000..301df21e
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/introduction.asciidoc
@@ -0,0 +1,28 @@
+== Introduction
+
+Ranch is a socket acceptor pool for TCP protocols.
+
+Ranch aims to provide everything you need to accept TCP connections
+with a small code base and low latency while being easy to use directly
+as an application or to embed into your own.
+
+=== Prerequisites
+
+It is assumed the developer already knows Erlang and has some experience
+with socket programming and TCP protocols.
+
+=== Supported platforms
+
+Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.
+
+Ranch is developed for Erlang/OTP 18+.
+
+There are known issues with the SSL application found in Erlang/OTP
+18.3.2 and 18.3.3. These versions are therefore not supported.
+
+Ranch may be compiled on earlier Erlang versions with small source code
+modifications but there is no guarantee that it will work as expected.
+
+=== Versioning
+
+Ranch uses http://semver.org/[Semantic Versioning 2.0.0]
diff --git a/docs/en/ranch/1.6/guide/introduction/index.html b/docs/en/ranch/1.6/guide/introduction/index.html
new file mode 100644
index 00000000..73b8a636
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/introduction/index.html
@@ -0,0 +1,170 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Introduction</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Introduction</span></h1>
+
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.</p>
+<h2 id="_prerequisites">Prerequisites</h2>
+<p>It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.</p>
+<h2 id="_supported_platforms">Supported platforms</h2>
+<p>Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</p>
+<p>Ranch is developed for Erlang/OTP 18+.</p>
+<p>There are known issues with the SSL application found in Erlang/OTP 18.3.2 and 18.3.3. These versions are therefore not supported.</p>
+<p>Ranch may be compiled on earlier Erlang versions with small source code modifications but there is no guarantee that it will work as expected.</p>
+<h2 id="_versioning">Versioning</h2>
+<p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/">
+ Listeners
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/listeners.asciidoc b/docs/en/ranch/1.6/guide/listeners.asciidoc
new file mode 100644
index 00000000..e8ca6949
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/listeners.asciidoc
@@ -0,0 +1,364 @@
+== Listeners
+
+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 use of transport handlers.
+
+The listener takes care of supervising all the acceptor and connection
+processes, allowing developers to focus on building their application.
+
+=== Starting a listener
+
+Ranch does nothing by default. It is up to the application developer
+to request that Ranch listens for connections.
+
+A listener can be started and stopped at will.
+
+When starting a listener, a number of different settings are required:
+
+* A name to identify it locally and be able to interact with it.
+* The number of acceptors in the pool.
+* A transport handler and its associated options.
+* A protocol handler and its associated options.
+
+Ranch includes both TCP and SSL transport handlers, respectively
+`ranch_tcp` and `ranch_ssl`.
+
+A listener can be started by calling the `ranch:start_listener/5`
+function. Before doing so however, you must ensure that the `ranch`
+application is started.
+
+.Starting the Ranch application
+
+[source,erlang]
+ok = application:start(ranch).
+
+You are then ready to start a listener. Let's call it `tcp_echo`. It will
+have a pool of 100 acceptors, use a TCP transport and forward connections
+to the `echo_protocol` handler.
+
+.Starting a listener for TCP connections on port 5555
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}],
+ echo_protocol, []
+).
+
+You can try this out by compiling and running the `tcp_echo` example in the
+examples directory. To do so, open a shell in the 'examples/tcp_echo/'
+directory and run the following command:
+
+.Building and starting a Ranch example
+
+[source,bash]
+$ make run
+
+You can then connect to it using telnet and see the echo server reply
+everything you send to it. Then when you're done testing, you can use
+the `Ctrl+]` key to escape to the telnet command line and type
+`quit` to exit.
+
+.Connecting to the example listener with telnet
+
+[source,bash]
+----
+$ telnet localhost 5555
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+Hello!
+Hello!
+It works!
+It works!
+^]
+
+telnet> quit
+Connection closed.
+----
+
+=== Stopping a listener
+
+All you need to stop a Ranch listener is to call the
+`ranch:stop_listener/1` function with the listener's name
+as argument. In the previous section we started the listener
+named `tcp_echo`. We can now stop it.
+
+.Stopping a listener
+
+[source,erlang]
+ranch:stop_listener(tcp_echo).
+
+=== Suspending and resuming a listener
+
+Listeners can be suspended and resumed by calling
+`ranch:suspend_listener/1` and `ranch:resume_listener/1`,
+respectively, with the name of the listener as argument.
+
+Suspending a listener will cause it to stop listening and not accept
+new connections, but existing connection processes will not be stopped.
+
+.Suspending a listener
+
+[source,erlang]
+ranch:suspend_listener(tcp_echo).
+
+Resuming a listener will cause it to start listening and accept new
+connections again.
+It is worth mentioning, however, that if the listener is configured
+to listen on a random port, it will listen on a different port than
+before it was suspended.
+
+.Resuming a listener
+
+[source,erlang]
+ranch:resume_listener(tcp_echo).
+
+Whether a listener is currently running or suspended can be queried
+by calling `ranch:get_status/1` with the listener name as argument.
+
+=== Default transport options
+
+By default the socket will be set to return `binary` data, with the
+options `{active, false}`, `{packet, raw}`, `{reuseaddr, true}` set.
+These values can't be overriden when starting the listener, but
+they can be overriden using `Transport:setopts/2` in the protocol.
+
+It will also set `{backlog, 1024}` and `{nodelay, true}`, which
+can be overriden at listener startup.
+
+=== Listening on a random port
+
+You do not have to specify a specific port to listen on. If you give
+the port number 0, or if you omit the port number entirely, Ranch will
+start listening on a random port.
+
+You can retrieve this port number by calling `ranch:get_port/1`. The
+argument is the name of the listener you gave in `ranch:start_listener/5`.
+
+.Starting a listener for TCP connections on a random port
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 0}],
+ echo_protocol, []
+).
+Port = ranch:get_port(tcp_echo).
+
+=== Listening on privileged ports
+
+Some systems limit access to ports below 1024 for security reasons.
+This can easily be identified by an `{error, eacces}` error when trying
+to open a listening socket on such a port.
+
+The methods for listening on privileged ports vary between systems,
+please refer to your system's documentation for more information.
+
+We recommend the use of port rewriting for systems with a single server,
+and load balancing for systems with multiple servers. Documenting these
+solutions is however out of the scope of this guide.
+
+=== Accepting connections on an existing socket
+
+If you want to accept connections on an existing socket, you can use the
+`socket` transport option, which should just be the relevant data returned
+from the connect function for the transport or the underlying socket library
+(`gen_tcp:connect`, `ssl:connect`). The accept function will then be
+called on the passed in socket. You should connect the socket in
+`{active, false}` mode, as well.
+
+=== Limiting the number of concurrent connections
+
+The `max_connections` transport option allows you to limit the number
+of concurrent connections. It defaults to 1024. Its purpose is to
+prevent your system from being overloaded and ensuring all the
+connections are handled optimally.
+
+.Customizing the maximum number of concurrent connections
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}, {max_connections, 100}],
+ echo_protocol, []
+).
+
+You can disable this limit by setting its value to the atom `infinity`.
+
+.Disabling the limit for the number of connections
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}, {max_connections, infinity}],
+ echo_protocol, []
+).
+
+The maximum number of connections is a soft limit. In practice, it
+can reach `max_connections` + the number of acceptors.
+
+When the maximum number of connections is reached, Ranch will stop
+accepting connections. This will not result in further connections
+being rejected, as the kernel option allows queueing incoming
+connections. The size of this queue is determined by the `backlog`
+option and defaults to 1024. Ranch does not know about the number
+of connections that are in the backlog.
+
+You may not always want connections to be counted when checking for
+`max_connections`. For example you might have a protocol where both
+short-lived and long-lived connections are possible. If the long-lived
+connections are mostly waiting for messages, then they don't consume
+much resources and can safely be removed from the count.
+
+To remove the connection from the count, you must call the
+`ranch:remove_connection/1` from within the connection process,
+with the name of the listener as the only argument.
+
+.Removing a connection from the count of connections
+
+[source,erlang]
+ranch:remove_connection(Ref).
+
+As seen in the chapter covering protocols, this pid is received as the
+first argument of the protocol's `start_link/4` callback.
+
+You can modify the `max_connections` value on a running listener by
+using the `ranch:set_max_connections/2` function, with the name of the
+listener as first argument and the new value as the second.
+
+.Upgrading the maximum number of connections
+
+[source,erlang]
+ranch:set_max_connections(tcp_echo, MaxConns).
+
+The change will occur immediately.
+
+=== Customizing the number of acceptor processes
+
+By default Ranch will use 10 acceptor processes. Their role is
+to accept connections and spawn a connection process for every
+new connection.
+
+This number can be tweaked to improve performance. A good
+number is typically between 10 or 100 acceptors. You must
+measure to find the best value for your application.
+
+.Specifying a custom number of acceptor processes
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}, {num_acceptors, 42}],
+ echo_protocol, []
+).
+
+=== 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
+for the connection processes. By default it expects a `worker`.
+When the `connection_type` configuration value is set to `supervisor`,
+Ranch will consider that the connection process it manages is a
+supervisor and will reflect that in its supervision tree.
+
+Connection processes of type `supervisor` can either handle the
+socket directly or through one of their children. In the latter
+case the start function for the connection process must return
+two pids: the pid of the supervisor you created (that will be
+supervised) and the pid of the protocol handling process (that
+will receive the socket).
+
+Instead of returning `{ok, ConnPid}`, simply return
+`{ok, SupPid, ConnPid}`.
+
+It is very important that the connection process be created
+under the supervisor process so that everything works as intended.
+If not, you will most likely experience issues when the supervised
+process is stopped.
+
+=== Upgrading
+
+Ranch allows you to upgrade the protocol options. This takes effect
+immediately and for all subsequent connections.
+
+To upgrade the protocol options, call `ranch:set_protocol_options/2`
+with the name of the listener as first argument and the new options
+as the second.
+
+.Upgrading the protocol options
+
+[source,erlang]
+ranch:set_protocol_options(tcp_echo, NewOpts).
+
+All future connections will use the new options.
+
+You can also retrieve the current options similarly by
+calling `ranch:get_protocol_options/1`.
+
+.Retrieving the current protocol options
+
+[source,erlang]
+Opts = ranch:get_protocol_options(tcp_echo).
+
+=== Changing transport options
+
+Ranch allows you to change the transport options of a listener, for
+example to make it listen on a different port.
+
+To change transport options, the listener has to be suspended first.
+Then you are allowed to change the transport options by calling
+`ranch:set_transport_options/2` with the listener name and the new
+transport options as arguments.
+After that, you can resume the listener.
+
+.Changing the transport options
+
+[source,erlang]
+ranch:set_transport_options(tcp_echo, NewOpts).
+
+You can retrieve the current transport options by calling
+`ranch:get_transport_options/1`.
+
+.Retrieving the current transport options
+
+[source,erlang]
+Opts = ranch:get_transport_options(tcp_echo).
+
+=== Obtaining information about listeners
+
+Ranch provides two functions for retrieving information about the
+listeners, for reporting and diagnostic purposes.
+
+The `ranch:info/0` function will return detailed information
+about all listeners.
+
+.Retrieving detailed information
+[source,erlang]
+ranch:info().
+
+The `ranch:procs/2` function will return all acceptor or listener
+processes for a given listener.
+
+.Get all acceptor processes
+[source,erlang]
+ranch:procs(tcp_echo, acceptors).
+
+.Get all connection processes
+[source,erlang]
+ranch:procs(tcp_echo, connections).
diff --git a/docs/en/ranch/1.6/guide/listeners/index.html b/docs/en/ranch/1.6/guide/listeners/index.html
new file mode 100644
index 00000000..d8a2ea51
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/listeners/index.html
@@ -0,0 +1,405 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Listeners</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Listeners</span></h1>
+
+<p>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 use of transport handlers.</p>
+<p>The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</p>
+<h2 id="_starting_a_listener">Starting a listener</h2>
+<p>Ranch does nothing by default. It is up to the application developer to request that Ranch listens for connections.</p>
+<p>A listener can be started and stopped at will.</p>
+<p>When starting a listener, a number of different settings are required:</p>
+<ul><li>A name to identify it locally and be able to interact with it.
+</li>
+<li>The number of acceptors in the pool.
+</li>
+<li>A transport handler and its associated options.
+</li>
+<li>A protocol handler and its associated options.
+</li>
+</ul>
+<p>Ranch includes both TCP and SSL transport handlers, respectively <code>ranch_tcp</code> and <code>ranch_ssl</code>.</p>
+<p>A listener can be started by calling the <code>ranch:start_listener/5</code> function. Before doing so however, you must ensure that the <code>ranch</code> application is started.</p>
+<div class="listingblock"><div class="title">Starting the Ranch application</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><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">application:start</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You are then ready to start a listener. Let&apos;s call it <code>tcp_echo</code>. It will have a pool of 100 acceptors, use a TCP transport and forward connections to the <code>echo_protocol</code> handler.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on port 5555</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can try this out by compiling and running the <code>tcp_echo</code> example in the examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em> directory and run the following command:</p>
+<div class="listingblock"><div class="title">Building and starting a Ranch example</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>$ make run</tt></pre>
+</div></div>
+<p>You can then connect to it using telnet and see the echo server reply everything you send to it. Then when you&apos;re done testing, you can use the <code>Ctrl+]</code> key to escape to the telnet command line and type <code>quit</code> to exit.</p>
+<div class="listingblock"><div class="title">Connecting to the example listener with telnet</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>$ telnet localhost <font color="#993399">5555</font>
+Trying <font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">...</font>
+Connected to localhost<font color="#990000">.</font>
+Escape character is <font color="#FF0000">'^]'</font><font color="#990000">.</font>
+Hello<font color="#990000">!</font>
+Hello<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+<font color="#990000">^]</font>
+
+telnet<font color="#990000">&gt;</font> quit
+Connection closed<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_stopping_a_listener">Stopping a listener</h2>
+<p>All you need to stop a Ranch listener is to call the <code>ranch:stop_listener/1</code> function with the listener&apos;s name as argument. In the previous section we started the listener named <code>tcp_echo</code>. We can now stop it.</p>
+<div class="listingblock"><div class="title">Stopping 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><b><font color="#000000">ranch:stop_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_suspending_and_resuming_a_listener">Suspending and resuming a listener</h2>
+<p>Listeners can be suspended and resumed by calling <code>ranch:suspend_listener/1</code> and <code>ranch:resume_listener/1</code>, respectively, with the name of the listener as argument.</p>
+<p>Suspending a listener will cause it to stop listening and not accept new connections, but existing connection processes will not be stopped.</p>
+<div class="listingblock"><div class="title">Suspending 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><b><font color="#000000">ranch:suspend_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Resuming a listener will cause it to start listening and accept new connections again. It is worth mentioning, however, that if the listener is configured to listen on a random port, it will listen on a different port than before it was suspended.</p>
+<div class="listingblock"><div class="title">Resuming 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><b><font color="#000000">ranch:resume_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Whether a listener is currently running or suspended can be queried by calling <code>ranch:get_status/1</code> with the listener name as argument.</p>
+<h2 id="_default_transport_options">Default transport options</h2>
+<p>By default the socket will be set to return <code>binary</code> data, with the options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set. These values can&apos;t be overriden when starting the listener, but they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p>
+<p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which can be overriden at listener startup.</p>
+<h2 id="_listening_on_a_random_port">Listening on a random port</h2>
+<p>You do not have to specify a specific port to listen on. If you give the port number 0, or if you omit the port number entirely, Ranch will start listening on a random port.</p>
+<p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The argument is the name of the listener you gave in <code>ranch:start_listener/5</code>.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections 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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">0</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font>
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_listening_on_privileged_ports">Listening on privileged ports</h2>
+<p>Some systems limit access to ports below 1024 for security reasons. This can easily be identified by an <code>{error, eacces}</code> error when trying to open a listening socket on such a port.</p>
+<p>The methods for listening on privileged ports vary between systems, please refer to your system&apos;s documentation for more information.</p>
+<p>We recommend the use of port rewriting for systems with a single server, and load balancing for systems with multiple servers. Documenting these solutions is however out of the scope of this guide.</p>
+<h2 id="_accepting_connections_on_an_existing_socket">Accepting connections on an existing socket</h2>
+<p>If you want to accept connections on an existing socket, you can use the <code>socket</code> transport option, which should just be the relevant data returned from the connect function for the transport or the underlying socket library (<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be called on the passed in socket. You should connect the socket in <code>{active, false}</code> mode, as well.</p>
+<h2 id="_limiting_the_number_of_concurrent_connections">Limiting the number of concurrent connections</h2>
+<p>The <code>max_connections</code> transport option allows you to limit the number of concurrent connections. It defaults to 1024. Its purpose is to prevent your system from being overloaded and ensuring all the connections are handled optimally.</p>
+<div class="listingblock"><div class="title">Customizing the maximum number of concurrent connections</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#993399">100</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p>
+<div class="listingblock"><div class="title">Disabling the limit for the number of connections</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#FF6600">infinity</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The maximum number of connections is a soft limit. In practice, it can reach <code>max_connections</code> + the number of acceptors.</p>
+<p>When the maximum number of connections is reached, Ranch will stop accepting connections. This will not result in further connections being rejected, as the kernel option allows queueing incoming connections. The size of this queue is determined by the <code>backlog</code> option and defaults to 1024. Ranch does not know about the number of connections that are in the backlog.</p>
+<p>You may not always want connections to be counted when checking for <code>max_connections</code>. For example you might have a protocol where both short-lived and long-lived connections are possible. If the long-lived connections are mostly waiting for messages, then they don&apos;t consume much resources and can safely be removed from the count.</p>
+<p>To remove the connection from the count, you must call the <code>ranch:remove_connection/1</code> from within the connection process, with the name of the listener as the only argument.</p>
+<div class="listingblock"><div class="title">Removing a connection from the count of connections</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><b><font color="#000000">ranch:remove_connection</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As seen in the chapter covering protocols, this pid is received as the first argument of the protocol&apos;s <code>start_link/4</code> callback.</p>
+<p>You can modify the <code>max_connections</code> value on a running listener by using the <code>ranch:set_max_connections/2</code> function, with the name of the listener as first argument and the new value as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the maximum number of connections</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><b><font color="#000000">ranch:set_max_connections</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">MaxConns</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The change will occur immediately.</p>
+<h2 id="_customizing_the_number_of_acceptor_processes">Customizing the number of acceptor processes</h2>
+<p>By default Ranch will use 10 acceptor processes. Their role is to accept connections and spawn a connection process for every new connection.</p>
+<p>This number can be tweaked to improve performance. A good number is typically between 10 or 100 acceptors. You must measure to find the best value for your application.</p>
+<div class="listingblock"><div class="title">Specifying a custom number of acceptor processes</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">num_acceptors</font>, <font color="#993399">42</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
+<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 class="listingblock"><div class="content"><pre>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
+Ranch acceptor reducing accept rate: out of file descriptors</pre></div></div>
+<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>
+<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
+<p>Ranch allows you to define the type of process that will be used for the connection processes. By default it expects a <code>worker</code>. When the <code>connection_type</code> configuration value is set to <code>supervisor</code>, Ranch will consider that the connection process it manages is a supervisor and will reflect that in its supervision tree.</p>
+<p>Connection processes of type <code>supervisor</code> can either handle the socket directly or through one of their children. In the latter case the start function for the connection process must return two pids: the pid of the supervisor you created (that will be supervised) and the pid of the protocol handling process (that will receive the socket).</p>
+<p>Instead of returning <code>{ok, ConnPid}</code>, simply return <code>{ok, SupPid, ConnPid}</code>.</p>
+<p>It is very important that the connection process be created under the supervisor process so that everything works as intended. If not, you will most likely experience issues when the supervised process is stopped.</p>
+<h2 id="_upgrading">Upgrading</h2>
+<p>Ranch allows you to upgrade the protocol options. This takes effect immediately and for all subsequent connections.</p>
+<p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code> with the name of the listener as first argument and the new options as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the protocol options</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><b><font color="#000000">ranch:set_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">NewOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All future connections will use the new options.</p>
+<p>You can also retrieve the current options similarly by calling <code>ranch:get_protocol_options/1</code>.</p>
+<div class="listingblock"><div class="title">Retrieving the current protocol options</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><font color="#009900">Opts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_changing_transport_options">Changing transport options</h2>
+<p>Ranch allows you to change the transport options of a listener, for example to make it listen on a different port.</p>
+<p>To change transport options, the listener has to be suspended first. Then you are allowed to change the transport options by calling <code>ranch:set_transport_options/2</code> with the listener name and the new transport options as arguments. After that, you can resume the listener.</p>
+<div class="listingblock"><div class="title">Changing the transport options</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><b><font color="#000000">ranch:set_transport_options</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">NewOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can retrieve the current transport options by calling <code>ranch:get_transport_options/1</code>.</p>
+<div class="listingblock"><div class="title">Retrieving the current transport options</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><font color="#009900">Opts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_transport_options</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_obtaining_information_about_listeners">Obtaining information about listeners</h2>
+<p>Ranch provides two functions for retrieving information about the listeners, for reporting and diagnostic purposes.</p>
+<p>The <code>ranch:info/0</code> function will return detailed information about all listeners.</p>
+<div class="listingblock"><div class="title">Retrieving detailed information</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><b><font color="#000000">ranch:info</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>ranch:procs/2</code> function will return all acceptor or listener processes for a given listener.</p>
+<div class="listingblock"><div class="title">Get all acceptor processes</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><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">acceptors</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get all connection processes</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><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">connections</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/introduction/">
+ Introduction
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/transports/">
+ Transports
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/migrating_from_1.5.asciidoc b/docs/en/ranch/1.6/guide/migrating_from_1.5.asciidoc
new file mode 100644
index 00000000..a454f932
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/migrating_from_1.5.asciidoc
@@ -0,0 +1,76 @@
+[appendix]
+== Migrating from Ranch 1.5 to 1.6
+
+Ranch 1.6 added the ability to suspend and resume listeners.
+It also deprecates a number of features and add interfaces
+that will be used in Ranch 2.0.
+
+Ranch 1.6 is compatible with Erlang/OTP 18.0 onward. Support
+for older releases has been removed.
+
+=== Features added
+
+* Listeners can now be suspended/resumed without stopping existing
+ connection processes. This effectively closes the listening socket
+ and stops the acceptor processes.
+
+* Transport options can now be updated for suspended listeners.
+
+* The `Socket` argument given when the protocol starts has been
+ deprecated. In Ranch 2.0 the socket will be obtainable only
+ by calling `ranch:handshake/1,2`.
+
+* Ranch-specific transport options and socket options are now
+ better separated. When passing Ranch-specific transport options,
+ Ranch now expects to receive a map, in which case socket
+ options are passed in the `socket_opts` value. When there
+ are only socket options they can be passed to Ranch directly
+ as a convenience.
+
+* Any future transport option will only be added to the map
+ type. This includes transport options added in this release.
+
+* The transport option `ack_timeout` was renamed to `handshake_timeout`
+ in the map type.
+
+* The `cacerts` socket option is now silenced in error logs
+ just like the `certs` and `key` options.
+
+* The manual has been heavily updated and now features one
+ manual page per function and module, complete with a per-function
+ changelog, examples and more.
+
+=== Experimental features added
+
+* It is now possible to configure the restart intensity for
+ `ranch_sup` using the OTP application environment. This
+ feature will remain undocumented unless there is popular
+ demand for it.
+
+* Add the transport option `logger` that allows configuring
+ which logger module will be used. The logger module must
+ follow the interface of the new `logger` module in Erlang/OTP 21,
+ or be set to `error_logger` to keep the old behavior.
+
+=== Changed behaviors
+
+* Transport modules must now implement `Transport:handshake/2,3`
+ which deprecates and will replace `Transport:accept_ack/1` in
+ Ranch 2.0. It returns a new socket and can therefore be used
+ for implementing TLS upgrade mechanisms.
+
+=== New functions
+
+* The functions `ranch:suspend_listener/1` and `ranch:resume_listener/1`
+ were added. In addition the function `ranch:get_state/1` can be used
+ to obtain the running state of a listener.
+
+* A function `ranch:wait_for_connections/3` was added.
+
+* A function `ranch:handshake/1,2` was added to replace the
+ function `ranch:accept_ack/1`.
+
+=== Bugs fixed
+
+* The specs for the function `Transport:sendfile/2,4,5` have been
+ corrected. The type used for the filename was too restricting.
diff --git a/docs/en/ranch/1.6/guide/migrating_from_1.5/index.html b/docs/en/ranch/1.6/guide/migrating_from_1.5/index.html
new file mode 100644
index 00000000..813957ec
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/migrating_from_1.5/index.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Migrating from Ranch 1.5 to 1.6</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Migrating from Ranch 1.5 to 1.6</span></h1>
+
+<p>Ranch 1.6 added the ability to suspend and resume listeners. It also deprecates a number of features and add interfaces that will be used in Ranch 2.0.</p>
+<p>Ranch 1.6 is compatible with Erlang/OTP 18.0 onward. Support for older releases has been removed.</p>
+<h2 id="_features_added">Features added</h2>
+<ul><li>Listeners can now be suspended/resumed without stopping existing connection processes. This effectively closes the listening socket and stops the acceptor processes.
+</li>
+<li>Transport options can now be updated for suspended listeners.
+</li>
+<li>The <code>Socket</code> argument given when the protocol starts has been deprecated. In Ranch 2.0 the socket will be obtainable only by calling <code>ranch:handshake/1,2</code>.
+</li>
+<li>Ranch-specific transport options and socket options are now better separated. When passing Ranch-specific transport options, Ranch now expects to receive a map, in which case socket options are passed in the <code>socket_opts</code> value. When there are only socket options they can be passed to Ranch directly as a convenience.
+</li>
+<li>Any future transport option will only be added to the map type. This includes transport options added in this release.
+</li>
+<li>The transport option <code>ack_timeout</code> was renamed to <code>handshake_timeout</code> in the map type.
+</li>
+<li>The <code>cacerts</code> socket option is now silenced in error logs just like the <code>certs</code> and <code>key</code> options.
+</li>
+<li>The manual has been heavily updated and now features one manual page per function and module, complete with a per-function changelog, examples and more.
+</li>
+</ul>
+<h2 id="_experimental_features_added">Experimental features added</h2>
+<ul><li>It is now possible to configure the restart intensity for <code>ranch_sup</code> using the OTP application environment. This feature will remain undocumented unless there is popular demand for it.
+</li>
+<li>Add the transport option <code>logger</code> that allows configuring which logger module will be used. The logger module must follow the interface of the new <code>logger</code> module in Erlang/OTP 21, or be set to <code>error_logger</code> to keep the old behavior.
+</li>
+</ul>
+<h2 id="_changed_behaviors">Changed behaviors</h2>
+<ul><li>Transport modules must now implement <code>Transport:handshake/2,3</code> which deprecates and will replace <code>Transport:accept_ack/1</code> in Ranch 2.0. It returns a new socket and can therefore be used for implementing TLS upgrade mechanisms.
+</li>
+</ul>
+<h2 id="_new_functions">New functions</h2>
+<ul><li>The functions <code>ranch:suspend_listener/1</code> and <code>ranch:resume_listener/1</code> were added. In addition the function <code>ranch:get_state/1</code> can be used to obtain the running state of a listener.
+</li>
+<li>A function <code>ranch:wait_for_connections/3</code> was added.
+</li>
+<li>A function <code>ranch:handshake/1,2</code> was added to replace the function <code>ranch:accept_ack/1</code>.
+</li>
+</ul>
+<h2 id="_bugs_fixed">Bugs fixed</h2>
+<ul><li>The specs for the function <code>Transport:sendfile/2,4,5</code> have been corrected. The type used for the filename was too restricting.
+</li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/">
+ Upcoming changes in Ranch 2.0
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.x/">
+ Migrating from Ranch 1.x
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/migrating_from_1.x.asciidoc b/docs/en/ranch/1.6/guide/migrating_from_1.x.asciidoc
new file mode 100644
index 00000000..44babf17
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/migrating_from_1.x.asciidoc
@@ -0,0 +1,70 @@
+[appendix]
+== Migrating from Ranch 1.x
+
+The changelog for Ranch releases before 1.6 can be found
+in this section.
+
+=== 1.5.0
+
+* Add transport functions getopts/2, getstat/1 and getstat/2
+* Fix ranch:info/0 and ranch:procs/2 in embedded mode
+* Prevent ranch_conns_sup from stopping on unexpected messages
+
+=== 1.4.0
+
+* Add new transport option num_acceptor
+* Deprecate ranch:start_listener/6 in favor of start_listener/5
+* Deprecate ranch:child_spec/6 in favor of child_spec/5
+
+=== 1.3.0
+
+The version numbers 1.3.1 and 1.3.2 were later made to fix
+small mistakes made during the 1.3.0 release process. They
+do not include code changes.
+
+* Tested with OTP R16B+ on Linux, FreeBSD, OSX and Windows
+* Add ssl to the list of dependencies
+* Add ranch:info/0 and ranch:procs/2 to retrieve Ranch state information
+* Allow configuring a listener with only SNI, without a default certificate
+* Blacklist transport options instead of whitelist
+** Unknown options are now allowed, but will result in a Dialyzer warning
+* Add many transport options typespecs and documentation
+* Don't silently drop the accept rate when running out of fds
+* Prevent a race condition when stopping listeners
+* Improve reporting for common errors, for example eaddrinuse
+* Fix double removal of connections bug
+** The number of active connections should now be exact
+* Fix stuck acceptor bug when controlling_socket returned errors
+* Numerous documentation and examples improvements
+
+=== 1.2.1
+
+* Fix bug preventing node shutdown when SSL is used with OTP 17.1+
+* Tune restart intensity in all supervisors
+
+=== 1.2.0
+
+* Allow the supervised process and the process owning the socket to be different
+* Add many transport options (please refer to the documentation)
+* Add function ranch:get_addr/1 to retrieve both IP and port of listener
+* Don't pass Ranch-specific options down to transports
+** Should make Dialyzer happy in user projects
+** New types ranch:opt(), ranch_tcp:opt(), ranch_ssl:ssl_opt() and ranch_ssl:opt()
+* Fix crash when filtering unknown options out
+* Print a warning for each option filtered out
+* Handle Transport:controlling_socket/2 errors and close the socket
+* Handle Protocol:start_link/4 crashes to avoid killing all active connections
+* Use Asciidoc for documentation
+* Test Ranch across 14 Erlang versions on CircleCI
+* Improve and document test suites with recent ct_helper improvements
+* Fix a number of intermittent test issues
+
+=== 1.1.0
+
+* Add Transport:secure/0
+* Add SSL partial_chain option
+* Stop reporting errors on {error, closed} in accept_ack
+
+=== 1.0.0
+
+* Initial release
diff --git a/docs/en/ranch/1.6/guide/migrating_from_1.x/index.html b/docs/en/ranch/1.6/guide/migrating_from_1.x/index.html
new file mode 100644
index 00000000..082cfc0c
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/migrating_from_1.x/index.html
@@ -0,0 +1,258 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Migrating from Ranch 1.x</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Migrating from Ranch 1.x</span></h1>
+
+<p>The changelog for Ranch releases before 1.6 can be found in this section.</p>
+<h2 id="_1_5_0">1.5.0</h2>
+<ul><li>Add transport functions getopts/2, getstat/1 and getstat/2
+</li>
+<li>Fix ranch:info/0 and ranch:procs/2 in embedded mode
+</li>
+<li>Prevent ranch_conns_sup from stopping on unexpected messages
+</li>
+</ul>
+<h2 id="_1_4_0">1.4.0</h2>
+<ul><li>Add new transport option num_acceptor
+</li>
+<li>Deprecate ranch:start_listener/6 in favor of start_listener/5
+</li>
+<li>Deprecate ranch:child_spec/6 in favor of child_spec/5
+</li>
+</ul>
+<h2 id="_1_3_0">1.3.0</h2>
+<p>The version numbers 1.3.1 and 1.3.2 were later made to fix small mistakes made during the 1.3.0 release process. They do not include code changes.</p>
+<ul><li>Tested with OTP R16B+ on Linux, FreeBSD, OSX and Windows
+</li>
+<li>Add ssl to the list of dependencies
+</li>
+<li>Add ranch:info/0 and ranch:procs/2 to retrieve Ranch state information
+</li>
+<li>Allow configuring a listener with only SNI, without a default certificate
+</li>
+<li>Blacklist transport options instead of whitelist
+<ul><li>Unknown options are now allowed, but will result in a Dialyzer warning
+</li>
+</ul>
+</li>
+<li>Add many transport options typespecs and documentation
+</li>
+<li>Don&apos;t silently drop the accept rate when running out of fds
+</li>
+<li>Prevent a race condition when stopping listeners
+</li>
+<li>Improve reporting for common errors, for example eaddrinuse
+</li>
+<li>Fix double removal of connections bug
+<ul><li>The number of active connections should now be exact
+</li>
+</ul>
+</li>
+<li>Fix stuck acceptor bug when controlling_socket returned errors
+</li>
+<li>Numerous documentation and examples improvements
+</li>
+</ul>
+<h2 id="_1_2_1">1.2.1</h2>
+<ul><li>Fix bug preventing node shutdown when SSL is used with OTP 17.1+
+</li>
+<li>Tune restart intensity in all supervisors
+</li>
+</ul>
+<h2 id="_1_2_0">1.2.0</h2>
+<ul><li>Allow the supervised process and the process owning the socket to be different
+</li>
+<li>Add many transport options (please refer to the documentation)
+</li>
+<li>Add function ranch:get_addr/1 to retrieve both IP and port of listener
+</li>
+<li>Don&apos;t pass Ranch-specific options down to transports
+<ul><li>Should make Dialyzer happy in user projects
+</li>
+<li>New types ranch:opt(), ranch_tcp:opt(), ranch_ssl:ssl_opt() and ranch_ssl:opt()
+</li>
+</ul>
+</li>
+<li>Fix crash when filtering unknown options out
+</li>
+<li>Print a warning for each option filtered out
+</li>
+<li>Handle Transport:controlling_socket/2 errors and close the socket
+</li>
+<li>Handle Protocol:start_link/4 crashes to avoid killing all active connections
+</li>
+<li>Use Asciidoc for documentation
+</li>
+<li>Test Ranch across 14 Erlang versions on CircleCI
+</li>
+<li>Improve and document test suites with recent ct_helper improvements
+</li>
+<li>Fix a number of intermittent test issues
+</li>
+</ul>
+<h2 id="_1_1_0">1.1.0</h2>
+<ul><li>Add Transport:secure/0
+</li>
+<li>Add SSL partial_chain option
+</li>
+<li>Stop reporting errors on {error, closed} in accept_ack
+</li>
+</ul>
+<h2 id="_1_0_0">1.0.0</h2>
+<ul><li>Initial release
+</li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/">
+ Migrating from Ranch 1.5 to 1.6
+ </a>
+
+
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/parsers.asciidoc b/docs/en/ranch/1.6/guide/parsers.asciidoc
new file mode 100644
index 00000000..7a9c5a53
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/parsers.asciidoc
@@ -0,0 +1,92 @@
+== Writing parsers
+
+There are three kinds of protocols:
+
+* Text protocols
+* Schema-less binary protocols
+* Schema-based binary protocols
+
+This chapter introduces the first two kinds. It will not cover
+more advanced topics such as continuations or parser generators.
+
+This chapter isn't specifically about Ranch, we assume here that
+you know how to read data from the socket. The data you read and
+the data that hasn't been parsed is saved in a buffer. Every
+time you read from the socket, the data read is appended to the
+buffer. What happens next depends on the kind of protocol. We
+will only cover the first two.
+
+=== Parsing text
+
+Text protocols are generally line based. This means that we can't
+do anything with them until we receive the full line.
+
+A simple way to get a full line is to use `binary:split/2,3`.
+
+.Using binary:split/2 to get a line of input
+
+[source,erlang]
+case binary:split(Buffer, <<"\n">>) of
+ [_] ->
+ get_more_data(Buffer);
+ [Line, Rest] ->
+ handle_line(Line, Rest)
+end.
+
+In the above example, we can have two results. Either there was
+a line break in the buffer and we get it split into two parts,
+the line and the rest of the buffer; or there was no line break
+in the buffer and we need to get more data from the socket.
+
+Next, we need to parse the line. The simplest way is to again
+split, here on space. The difference is that we want to split
+on all spaces character, as we want to tokenize the whole string.
+
+.Using binary:split/3 to split text
+
+[source,erlang]
+case binary:split(Line, <<" ">>, [global]) of
+ [<<"HELLO">>] ->
+ be_polite();
+ [<<"AUTH">>, User, Password] ->
+ authenticate_user(User, Password);
+ [<<"QUIT">>, Reason] ->
+ quit(Reason)
+ %% ...
+end.
+
+Pretty simple, right? Match on the command name, get the rest
+of the tokens in variables and call the respective functions.
+
+After doing this, you will want to check if there is another
+line in the buffer, and handle it immediately if any.
+Otherwise wait for more data.
+
+=== Parsing binary
+
+Binary protocols can be more varied, although most of them are
+pretty similar. The first four bytes of a frame tend to be
+the size of the frame, which is followed by a certain number
+of bytes for the type of frame and then various parameters.
+
+Sometimes the size of the frame includes the first four bytes,
+sometimes not. Other times this size is encoded over two bytes.
+And even other times little-endian is used instead of big-endian.
+
+The general idea stays the same though.
+
+.Using binary pattern matching to split frames
+
+[source,erlang]
+<< Size:32, _/bits >> = Buffer,
+case Buffer of
+ << Frame:Size/binary, Rest/bits >> ->
+ handle_frame(Frame, Rest);
+ _ ->
+ get_more_data(Buffer)
+end.
+
+You will then need to parse this frame using binary pattern
+matching, and handle it. Then you will want to check if there
+is another frame fully received in the buffer, and handle it
+immediately if any. Otherwise wait for more data.
diff --git a/docs/en/ranch/1.6/guide/parsers/index.html b/docs/en/ranch/1.6/guide/parsers/index.html
new file mode 100644
index 00000000..f8e11e13
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/parsers/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">
+
+ <title>Nine Nines: Writing parsers</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Writing parsers</span></h1>
+
+<p>There are three kinds of protocols:</p>
+<ul><li>Text protocols
+</li>
+<li>Schema-less binary protocols
+</li>
+<li>Schema-based binary protocols
+</li>
+</ul>
+<p>This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.</p>
+<p>This chapter isn&apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&apos;t been parsed is saved in a buffer. Every time you read from the socket, the data read is appended to the buffer. What happens next depends on the kind of protocol. We will only cover the first two.</p>
+<h2 id="_parsing_text">Parsing text</h2>
+<p>Text protocols are generally line based. This means that we can&apos;t do anything with them until we receive the full line.</p>
+<p>A simple way to get a full line is to use <code>binary:split/2,3</code>.</p>
+<div class="listingblock"><div class="title">Using binary:split/2 to get a line of input</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><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Buffer</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"\n"</font><font color="#990000">&gt;&gt;</font>) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">_</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>);
+ [<font color="#009900">Line</font>, <font color="#009900">Rest</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_line</font></b>(<font color="#009900">Line</font>, <font color="#009900">Rest</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In the above example, we can have two results. Either there was a line break in the buffer and we get it split into two parts, the line and the rest of the buffer; or there was no line break in the buffer and we need to get more data from the socket.</p>
+<p>Next, we need to parse the line. The simplest way is to again split, here on space. The difference is that we want to split on all spaces character, as we want to tokenize the whole string.</p>
+<div class="listingblock"><div class="title">Using binary:split/3 to split text</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><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Line</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">" "</font><font color="#990000">&gt;&gt;</font>, [<font color="#FF6600">global</font>]) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"HELLO"</font><font color="#990000">&gt;&gt;</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">be_polite</font></b>();
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"AUTH"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">User</font>, <font color="#009900">Password</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">authenticate_user</font></b>(<font color="#009900">User</font>, <font color="#009900">Password</font>);
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"QUIT"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Reason</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">quit</font></b>(<font color="#009900">Reason</font>)
+ <i><font color="#9A1900">%% ...</font></i>
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Pretty simple, right? Match on the command name, get the rest of the tokens in variables and call the respective functions.</p>
+<p>After doing this, you will want to check if there is another line in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+<h2 id="_parsing_binary">Parsing binary</h2>
+<p>Binary protocols can be more varied, although most of them are pretty similar. The first four bytes of a frame tend to be the size of the frame, which is followed by a certain number of bytes for the type of frame and then various parameters.</p>
+<p>Sometimes the size of the frame includes the first four bytes, sometimes not. Other times this size is encoded over two bytes. And even other times little-endian is used instead of big-endian.</p>
+<p>The general idea stays the same though.</p>
+<div class="listingblock"><div class="title">Using binary pattern matching to split frames</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><font color="#990000">&lt;&lt;</font> <font color="#009900">Size</font><font color="#990000">:</font><font color="#993399">32</font>, <font color="#990000">_/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <font color="#009900">Buffer</font>,
+<b><font color="#0000FF">case</font></b> <font color="#009900">Buffer</font> <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font> <font color="#009900">Frame</font><font color="#990000">:</font><font color="#009900">Size</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Rest</font><font color="#990000">/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_frame</font></b>(<font color="#009900">Frame</font>, <font color="#009900">Rest</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You will then need to parse this frame using binary pattern matching, and handle it. Then you will want to check if there is another frame fully received in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/">
+ Embedded mode
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/">
+ SSL client authentication
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/protocols.asciidoc b/docs/en/ranch/1.6/guide/protocols.asciidoc
new file mode 100644
index 00000000..8f77ef49
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/protocols.asciidoc
@@ -0,0 +1,99 @@
+== Protocols
+
+A protocol handler starts a connection process and defines the
+protocol logic executed in this process.
+
+=== Writing a protocol handler
+
+All protocol handlers must implement the `ranch_protocol` behavior
+which defines a single callback, `start_link/4`. This callback is
+responsible for spawning a new process for handling the connection.
+It receives four arguments: the name of the listener, the socket, the
+transport handler being used and the protocol options defined in
+the call to `ranch:start_listener/5`. This callback must
+return `{ok, Pid}`, with `Pid` the pid of the new process.
+
+The newly started process can then freely initialize itself. However,
+it must call `ranch:handshake/1,2` before doing any socket operation.
+This will ensure the connection process is the owner of the socket.
+It expects the listener's name as argument.
+
+.Perform the socket handshake
+
+[source,erlang]
+{ok, Socket} = ranch:handshake(Ref).
+
+If your protocol code requires specific socket options, you should
+set them while initializing your connection process, after
+calling `ranch:handshake/1,2`. You can use `Transport:setopts/2`
+for that purpose.
+
+Following is the complete protocol code for the example found
+in `examples/tcp_echo/`.
+
+.Protocol module that echoes everything it receives
+
+[source,erlang]
+----
+-module(echo_protocol).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/3]).
+
+start_link(Ref, _Socket, Transport, Opts) ->
+ Pid = spawn_link(?MODULE, init, [Ref, Transport, Opts]),
+ {ok, Pid}.
+
+init(Ref, Transport, _Opts = []) ->
+ {ok, Socket} = ranch:handshake(Ref),
+ loop(Socket, Transport).
+
+loop(Socket, Transport) ->
+ case Transport:recv(Socket, 0, 5000) of
+ {ok, Data} ->
+ Transport:send(Socket, Data),
+ loop(Socket, Transport);
+ _ ->
+ ok = Transport:close(Socket)
+ end.
+----
+
+=== Using gen_statem
+
+Special processes like the ones that use the `gen_statem` or `gen_server`
+behaviours have the particularity of having their `start_link` call not
+return until the `init` function returns. This is problematic, because
+you won't be able to call `ranch:handshake/1,2` from the `init` callback
+as this would cause a deadlock to happen.
+
+Use the `gen_statem:enter_loop/4` function. It allows you to start your process
+normally (although it must be started with `proc_lib` like all special
+processes), then perform any needed operations before falling back into
+the normal `gen_statem` execution loop.
+
+.Use a gen_statem for protocol handling
+
+[source,erlang]
+----
+-module(my_protocol).
+-behaviour(gen_statem).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/1]).
+%% Exports of other gen_statem callbacks here.
+
+start_link(Ref, _Socket, Transport, Opts) ->
+ {ok, proc_lib:spawn_link(?MODULE, init, [{Ref, Transport, Opts}])}.
+
+init({Ref, Transport, _Opts = []}) ->
+ %% Perform any required state initialization here.
+ {ok, Socket} = ranch:handshake(Ref),
+ ok = Transport:setopts(Socket, [{active, once}]),
+ gen_statem:enter_loop(?MODULE, [], state_name, {state_data, Socket, Transport}).
+
+%% Other gen_statem callbacks here.
+----
+
+Check the `tcp_reverse` example for a complete example.
diff --git a/docs/en/ranch/1.6/guide/protocols/index.html b/docs/en/ranch/1.6/guide/protocols/index.html
new file mode 100644
index 00000000..cdf6283b
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/protocols/index.html
@@ -0,0 +1,232 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Protocols</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Protocols</span></h1>
+
+<p>A protocol handler starts a connection process and defines the protocol logic executed in this process.</p>
+<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
+<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/4</code>. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/5</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
+<p>The newly started process can then freely initialize itself. However, it must call <code>ranch:handshake/1,2</code> before doing any socket operation. This will ensure the connection process is the owner of the socket. It expects the listener&apos;s name as argument.</p>
+<div class="listingblock"><div class="title">Perform the socket handshake</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>{<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If your protocol code requires specific socket options, you should set them while initializing your connection process, after calling <code>ranch:handshake/1,2</code>. You can use <code>Transport:setopts/2</code> for that purpose.</p>
+<p>Following is the complete protocol code for the example found in <code>examples/tcp_echo/</code>.</p>
+<div class="listingblock"><div class="title">Protocol module that echoes everything it receives</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><b><font color="#000080">-module</font></b>(<font color="#FF6600">echo_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">3</font>])<font color="#990000">.</font>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">_Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Pid</font> <font color="#990000">=</font> <b><font color="#000080">spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [<font color="#009900">Ref</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>]),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Pid</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Data</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">close</font></b>(<font color="#009900">Socket</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_using_gen_statem">Using gen_statem</h2>
+<p>Special processes like the ones that use the <code>gen_statem</code> or <code>gen_server</code> behaviours have the particularity of having their <code>start_link</code> call not return until the <code>init</code> function returns. This is problematic, because you won&apos;t be able to call <code>ranch:handshake/1,2</code> from the <code>init</code> callback as this would cause a deadlock to happen.</p>
+<p>Use the <code>gen_statem:enter_loop/4</code> function. It allows you to start your process normally (although it must be started with <code>proc_lib</code> like all special processes), then perform any needed operations before falling back into the normal <code>gen_statem</code> execution loop.</p>
+<div class="listingblock"><div class="title">Use a gen_statem for protocol handling</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><b><font color="#000080">-module</font></b>(<font color="#FF6600">my_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">gen_statem</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">1</font>])<font color="#990000">.</font>
+<i><font color="#9A1900">%% Exports of other gen_statem callbacks here.</font></i>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">_Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">proc_lib:spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [{<font color="#009900">Ref</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>}])}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>({<font color="#009900">Ref</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Perform any required state initialization here.</font></i>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake</font></b>(<font color="#009900">Ref</font>),
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+ <b><font color="#000000">gen_statem:enter_loop</font></b>(<b><font color="#000080">?MODULE</font></b>, [], <font color="#FF6600">state_name</font>, {<font color="#FF6600">state_data</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>})<font color="#990000">.</font>
+
+<i><font color="#9A1900">%% Other gen_statem callbacks here.</font></i></tt></pre>
+</div></div>
+<p>Check the <code>tcp_reverse</code> example for a complete example.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/transports/">
+ Transports
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/">
+ Embedded mode
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/ssl_auth.asciidoc b/docs/en/ranch/1.6/guide/ssl_auth.asciidoc
new file mode 100644
index 00000000..de16107a
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/ssl_auth.asciidoc
@@ -0,0 +1,120 @@
+== SSL client authentication
+
+=== Purpose
+
+SSL client authentication is a mechanism allowing applications to
+identify certificates. This allows your application to make sure that
+the client is an authorized certificate, but makes no claim about
+whether the user can be trusted. This can be combined with a password
+based authentication to attain greater security.
+
+The server only needs to retain the certificate serial number and
+the certificate issuer to authenticate the certificate. Together,
+they can be used to uniquely identify a certicate.
+
+As Ranch allows the same protocol code to be used for both SSL and
+non-SSL transports, you need to make sure you are in an SSL context
+before attempting to perform an SSL client authentication. This
+can be done by checking the return value of `Transport:name/0`.
+
+=== Obtaining client certificates
+
+You can obtain client certificates from various sources. You can
+generate them yourself, or you can use a service like CAcert.org
+which allows you to generate client and server certificates for
+free.
+
+Following are the steps you need to take to create a CAcert.org
+account, generate a certificate and install it in your favorite
+browser.
+
+* Open http://cacert.org in your favorite browser
+* Root Certificate link: install both certificates
+* Join (Register an account)
+* Verify your account (check your email inbox!)
+* Log in
+* Client Certificates: New
+* Follow instructions to create the certificate
+* Install the certificate in your browser
+
+You can optionally save the certificate for later use, for example
+to extract the `IssuerID` information as will be detailed later on.
+
+=== Transport configuration
+
+The SSL transport does not request a client certificate by default.
+You need to specify the `{verify, verify_peer}` option when starting
+the listener to enable this behavior.
+
+.Configure a listener for SSL authentication
+
+[source,erlang]
+{ok, _} = ranch:start_listener(my_ssl,
+ ranch_ssl, [
+ {port, SSLPort},
+ {certfile, PathToCertfile},
+ {cacertfile, PathToCACertfile},
+ {verify, verify_peer}
+ ],
+ my_protocol, []
+).
+
+In this example we set the required `port` and `certfile`, but also
+the `cacertfile` containing the CACert.org root certificate, and
+the option to request the client certificate.
+
+If you enable the `{verify, verify_peer}` option and the client does
+not have a client certificate configured for your domain, then no
+certificate will be sent. This allows you to use SSL for more than
+just authenticated clients.
+
+=== Authentication
+
+To authenticate users, you must first save the certificate information
+required. If you have your users' certificate files, you can simply
+load the certificate and retrieve the information directly.
+
+.Retrieve the issuer ID from a certificate
+
+[source,erlang]
+----
+certfile_to_issuer_id(Filename) ->
+ {ok, Data} = file:read_file(Filename),
+ [{'Certificate', Cert, not_encrypted}] = public_key:pem_decode(Data),
+ {ok, IssuerID} = public_key:pkix_issuer_id(Cert, self),
+ IssuerID.
+----
+
+The `IssuerID` variable contains both the certificate serial number
+and the certificate issuer stored in a tuple, so this value alone can
+be used to uniquely identify the user certificate. You can save this
+value in a database, a configuration file or any other place where an
+Erlang term can be stored and retrieved.
+
+To retrieve the `IssuerID` from a running connection, you need to first
+retrieve the client certificate and then extract this information from
+it. Ranch does not provide a function to retrieve the client certificate.
+Instead you can use the `ssl:peercert/1` function. Once you have the
+certificate, you can again use the `public_key:pkix_issuer_id/2` to
+extract the `IssuerID` value.
+
+The following function returns the `IssuerID` or `false` if no client
+certificate was found. This snippet is intended to be used from your
+protocol code.
+
+.Retrieve the issuer ID from the certificate for the current connection
+
+[source,erlang]
+----
+socket_to_issuer_id(Socket) ->
+ case ssl:peercert(Socket) of
+ {error, no_peercert} ->
+ false;
+ {ok, Cert} ->
+ {ok, IssuerID} = public_key:pkix_issuer_id(Cert, self),
+ IssuerID
+ end.
+----
+
+You then only need to match the `IssuerID` value to authenticate the
+user.
diff --git a/docs/en/ranch/1.6/guide/ssl_auth/index.html b/docs/en/ranch/1.6/guide/ssl_auth/index.html
new file mode 100644
index 00000000..17433092
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/ssl_auth/index.html
@@ -0,0 +1,238 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: SSL client authentication</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>SSL client authentication</span></h1>
+
+<h2 id="_purpose">Purpose</h2>
+<p>SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.</p>
+<p>The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</p>
+<p>As Ranch allows the same protocol code to be used for both SSL and non-SSL transports, you need to make sure you are in an SSL context before attempting to perform an SSL client authentication. This can be done by checking the return value of <code>Transport:name/0</code>.</p>
+<h2 id="_obtaining_client_certificates">Obtaining client certificates</h2>
+<p>You can obtain client certificates from various sources. You can generate them yourself, or you can use a service like CAcert.org which allows you to generate client and server certificates for free.</p>
+<p>Following are the steps you need to take to create a CAcert.org account, generate a certificate and install it in your favorite browser.</p>
+<ul><li>Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
+</li>
+<li>Root Certificate link: install both certificates
+</li>
+<li>Join (Register an account)
+</li>
+<li>Verify your account (check your email inbox!)
+</li>
+<li>Log in
+</li>
+<li>Client Certificates: New
+</li>
+<li>Follow instructions to create the certificate
+</li>
+<li>Install the certificate in your browser
+</li>
+</ul>
+<p>You can optionally save the certificate for later use, for example to extract the <code>IssuerID</code> information as will be detailed later on.</p>
+<h2 id="_transport_configuration">Transport configuration</h2>
+<p>The SSL transport does not request a client certificate by default. You need to specify the <code>{verify, verify_peer}</code> option when starting the listener to enable this behavior.</p>
+<div class="listingblock"><div class="title">Configure a listener for SSL authentication</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">my_ssl</font>,
+ <font color="#FF6600">ranch_ssl</font>, [
+ {<font color="#FF6600">port</font>, <font color="#009900">SSLPort</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#009900">PathToCertfile</font>},
+ {<font color="#FF6600">cacertfile</font>, <font color="#009900">PathToCACertfile</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
+ ],
+ <font color="#FF6600">my_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In this example we set the required <code>port</code> and <code>certfile</code>, but also the <code>cacertfile</code> containing the CACert.org root certificate, and the option to request the client certificate.</p>
+<p>If you enable the <code>{verify, verify_peer}</code> option and the client does not have a client certificate configured for your domain, then no certificate will be sent. This allows you to use SSL for more than just authenticated clients.</p>
+<h2 id="_authentication">Authentication</h2>
+<p>To authenticate users, you must first save the certificate information required. If you have your users&apos; certificate files, you can simply load the certificate and retrieve the information directly.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from a certificate</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><b><font color="#000000">certfile_to_issuer_id</font></b>(<font color="#009900">Filename</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <b><font color="#000000">file:read_file</font></b>(<font color="#009900">Filename</font>),
+ [{<font color="#FF6600">'Certificate'</font>, <font color="#009900">Cert</font>, <font color="#FF6600">not_encrypted</font>}] <font color="#990000">=</font> <b><font color="#000000">public_key:pem_decode</font></b>(<font color="#009900">Data</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>IssuerID</code> variable contains both the certificate serial number and the certificate issuer stored in a tuple, so this value alone can be used to uniquely identify the user certificate. You can save this value in a database, a configuration file or any other place where an Erlang term can be stored and retrieved.</p>
+<p>To retrieve the <code>IssuerID</code> from a running connection, you need to first retrieve the client certificate and then extract this information from it. Ranch does not provide a function to retrieve the client certificate. Instead you can use the <code>ssl:peercert/1</code> function. Once you have the certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to extract the <code>IssuerID</code> value.</p>
+<p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client certificate was found. This snippet is intended to be used from your protocol code.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from the certificate for the current connection</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><b><font color="#000000">socket_to_issuer_id</font></b>(<font color="#009900">Socket</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">ssl:peercert</font></b>(<font color="#009900">Socket</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">no_peercert</font>} <font color="#990000">-&gt;</font>
+ <font color="#000080">false</font>;
+ {<font color="#FF6600">ok</font>, <font color="#009900">Cert</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You then only need to match the <code>IssuerID</code> value to authenticate the user.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/">
+ Writing parsers
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/internals/">
+ Internals
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/transports.asciidoc b/docs/en/ranch/1.6/guide/transports.asciidoc
new file mode 100644
index 00000000..70efa1be
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/transports.asciidoc
@@ -0,0 +1,172 @@
+== Transports
+
+A transport defines the interface to interact with a socket.
+
+Transports can be used for connecting, listening and accepting
+connections, but also for receiving and sending data. Both
+passive and active mode are supported, although all sockets
+are initialized as passive.
+
+=== TCP transport
+
+The TCP transport is a thin wrapper around `gen_tcp`.
+
+=== SSL transport
+
+The SSL transport is a thin wrapper around `ssl`.
+
+Ranch depends on `ssl` by default so any necessary
+dependencies will start when Ranch is started. It is
+possible to remove the dependency when the SSL transport
+will not be used. Refer to your release build tool's
+documentation for more information.
+
+When embedding Ranch listeners that have an SSL transport,
+your application must depend on the `ssl` application for
+proper behavior.
+
+=== Sending and receiving data
+
+This section assumes that `Transport` is a valid transport handler
+(like `ranch_tcp` or `ranch_ssl`) and `Socket` is a connected
+socket obtained through the listener.
+
+You can send data to a socket by calling the `Transport:send/2`
+function. The data can be given as `iodata()`, which is defined as
+`binary() | iolist()`. All the following calls will work:
+
+.Sending data to the socket
+
+[source,erlang]
+----
+Transport:send(Socket, <<"Ranch is cool!">>).
+Transport:send(Socket, "Ranch is cool!").
+Transport:send(Socket, ["Ranch", ["is", "cool!"]]).
+Transport:send(Socket, ["Ranch", [<<"is">>, "cool!"]]).
+----
+
+You can receive data either in passive or in active mode. Passive mode
+means that you will perform a blocking `Transport:recv/3` call, while
+active mode means that you will receive the data as a message.
+
+By default, all data will be received as binary. It is possible to
+receive data as strings, although this is not recommended as binaries
+are a more efficient construct, especially for binary protocols.
+
+Receiving data using passive mode requires a single function call. The
+first argument is the socket, and the third argument is a timeout duration
+before the call returns with `{error, timeout}`.
+
+The second argument is the amount of data in bytes that we want to receive.
+The function will wait for data until it has received exactly this amount.
+If you are not expecting a precise size, you can specify 0 which will make
+this call return as soon as data was read, regardless of its size.
+
+.Receiving data from the socket in passive mode
+
+[source,erlang]
+{ok, Data} = Transport:recv(Socket, 0, 5000).
+
+Active mode requires you to inform the socket that you want to receive
+data as a message and to write the code to actually receive it.
+
+There are two kinds of active modes: `{active, once}` and
+`{active, true}`. The first will send a single message before going
+back to passive mode; the second will send messages indefinitely.
+We recommend not using the `{active, true}` mode as it could quickly
+flood your process mailbox. It's better to keep the data in the socket
+and read it only when required.
+
+Three different messages can be received:
+
+* `{OK, Socket, Data}`
+* `{Closed, Socket}`
+* `{Error, Socket, Reason}`
+
+The value of `OK`, `Closed` and `Error` can be different
+depending on the transport being used. To be able to properly match
+on them you must first call the `Transport:messages/0` function.
+
+.Retrieving the transport's active message identifiers
+
+[source,erlang]
+{OK, Closed, Error} = Transport:messages().
+
+To start receiving messages you will need to call the `Transport:setopts/2`
+function, and do so every time you want to receive data.
+
+.Receiving messages from the socket in active mode
+
+[source,erlang]
+----
+{OK, Closed, Error} = Transport:messages(),
+Transport:setopts(Socket, [{active, once}]),
+receive
+ {OK, Socket, Data} ->
+ io:format("data received: ~p~n", [Data]);
+ {Closed, Socket} ->
+ io:format("socket got closed!~n");
+ {Error, Socket, Reason} ->
+ io:format("error happened: ~p~n", [Reason])
+end.
+----
+
+You can easily integrate active sockets with existing Erlang code as all
+you really need is just a few more clauses when receiving messages.
+
+=== Sending files
+
+As in the previous section it is assumed `Transport` is a valid transport
+handler and `Socket` is a connected socket obtained through the listener.
+
+To send a whole file, with name `Filename`, over a socket:
+
+.Sending a file by filename
+
+[source,erlang]
+{ok, SentBytes} = Transport:sendfile(Socket, Filename).
+
+Or part of a file, with `Offset` greater than or equal to 0, `Bytes` number of
+bytes and chunks of size `ChunkSize`:
+
+.Sending part of a file by filename in chunks
+
+[source,erlang]
+Opts = [{chunk_size, ChunkSize}],
+{ok, SentBytes} = Transport:sendfile(Socket, Filename, Offset, Bytes, Opts).
+
+To improve efficiency when sending multiple parts of the same file it is also
+possible to use a file descriptor opened in raw mode:
+
+.Sending a file opened in raw mode
+
+[source,erlang]
+{ok, RawFile} = file:open(Filename, [raw, read, binary]),
+{ok, SentBytes} = Transport:sendfile(Socket, RawFile, Offset, Bytes, Opts).
+
+=== Upgrading a TCP socket to SSL
+
+A connected TCP socket can be upgraded to a SSL socket via the function
+`ranch_ssl:handshake/3`. The socket *must* be in `{active, false}` mode
+before telling the client that the server is ready to upgrade in order
+to avoid race conditions.
+
+.Performing a TLS handshake on a TCP socket
+[source,erlang]
+{ok, NewSocket} = ranch_ssl:handshake(Socket, SslOpts, 5000).
+
+=== Writing a transport handler
+
+A transport handler is a module implementing the `ranch_transport` behavior.
+It defines a certain number of callbacks that must be written in order to
+allow transparent usage of the transport handler.
+
+The behavior doesn't define the socket options available when opening a
+socket. These do not need to be common to all transports as it's easy enough
+to write different initialization functions for the different transports that
+will be used. With one exception though. The `setopts/2` function *must*
+implement the `{active, once}` and the `{active, true}` options.
+
+If the transport handler doesn't have a native implementation of `sendfile/5` a
+fallback is available, `ranch_transport:sendfile/6`. The extra first argument
+is the transport's module. See `ranch_ssl` for an example.
diff --git a/docs/en/ranch/1.6/guide/transports/index.html b/docs/en/ranch/1.6/guide/transports/index.html
new file mode 100644
index 00000000..a01a09e8
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/transports/index.html
@@ -0,0 +1,272 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Transports</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Transports</span></h1>
+
+<p>A transport defines the interface to interact with a socket.</p>
+<p>Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.</p>
+<h2 id="_tcp_transport">TCP transport</h2>
+<p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p>
+<h2 id="_ssl_transport">SSL transport</h2>
+<p>The SSL transport is a thin wrapper around <code>ssl</code>.</p>
+<p>Ranch depends on <code>ssl</code> by default so any necessary dependencies will start when Ranch is started. It is possible to remove the dependency when the SSL transport will not be used. Refer to your release build tool&apos;s documentation for more information.</p>
+<p>When embedding Ranch listeners that have an SSL transport, your application must depend on the <code>ssl</code> application for proper behavior.</p>
+<h2 id="_sending_and_receiving_data">Sending and receiving data</h2>
+<p>This section assumes that <code>Transport</code> is a valid transport handler (like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>You can send data to a socket by calling the <code>Transport:send/2</code> function. The data can be given as <code>iodata()</code>, which is defined as <code>binary() | iolist()</code>. All the following calls will work:</p>
+<div class="listingblock"><div class="title">Sending data to the socket</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><font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Ranch is cool!"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#FF0000">"Ranch is cool!"</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#FF0000">"is"</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"is"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can receive data either in passive or in active mode. Passive mode means that you will perform a blocking <code>Transport:recv/3</code> call, while active mode means that you will receive the data as a message.</p>
+<p>By default, all data will be received as binary. It is possible to receive data as strings, although this is not recommended as binaries are a more efficient construct, especially for binary protocols.</p>
+<p>Receiving data using passive mode requires a single function call. The first argument is the socket, and the third argument is a timeout duration before the call returns with <code>{error, timeout}</code>.</p>
+<p>The second argument is the amount of data in bytes that we want to receive. The function will wait for data until it has received exactly this amount. If you are not expecting a precise size, you can specify 0 which will make this call return as soon as data was read, regardless of its size.</p>
+<div class="listingblock"><div class="title">Receiving data from the socket in passive mode</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>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Active mode requires you to inform the socket that you want to receive data as a message and to write the code to actually receive it.</p>
+<p>There are two kinds of active modes: <code>{active, once}</code> and <code>{active, true}</code>. The first will send a single message before going back to passive mode; the second will send messages indefinitely. We recommend not using the <code>{active, true}</code> mode as it could quickly flood your process mailbox. It&apos;s better to keep the data in the socket and read it only when required.</p>
+<p>Three different messages can be received:</p>
+<ul><li><code>{OK, Socket, Data}</code>
+</li>
+<li><code>{Closed, Socket}</code>
+</li>
+<li><code>{Error, Socket, Reason}</code>
+</li>
+</ul>
+<p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different depending on the transport being used. To be able to properly match on them you must first call the <code>Transport:messages/0</code> function.</p>
+<div class="listingblock"><div class="title">Retrieving the transport&apos;s active message identifiers</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>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To start receiving messages you will need to call the <code>Transport:setopts/2</code> function, and do so every time you want to receive data.</p>
+<div class="listingblock"><div class="title">Receiving messages from the socket in active mode</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>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>(),
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+<b><font color="#0000FF">receive</font></b>
+ {<font color="#009900">OK</font>, <font color="#009900">Socket</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"data received: ~p~n"</font>, [<font color="#009900">Data</font>]);
+ {<font color="#009900">Closed</font>, <font color="#009900">Socket</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"socket got closed!~n"</font>);
+ {<font color="#009900">Error</font>, <font color="#009900">Socket</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"error happened: ~p~n"</font>, [<font color="#009900">Reason</font>])
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can easily integrate active sockets with existing Erlang code as all you really need is just a few more clauses when receiving messages.</p>
+<h2 id="_sending_files">Sending files</h2>
+<p>As in the previous section it is assumed <code>Transport</code> is a valid transport handler and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>To send a whole file, with name <code>Filename</code>, over a socket:</p>
+<div class="listingblock"><div class="title">Sending a file by filename</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>{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of bytes and chunks of size <code>ChunkSize</code>:</p>
+<div class="listingblock"><div class="title">Sending part of a file by filename in chunks</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><font color="#009900">Opts</font> <font color="#990000">=</font> [{<font color="#FF6600">chunk_size</font>, <font color="#009900">ChunkSize</font>}],
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To improve efficiency when sending multiple parts of the same file it is also possible to use a file descriptor opened in raw mode:</p>
+<div class="listingblock"><div class="title">Sending a file opened in raw mode</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>{<font color="#FF6600">ok</font>, <font color="#009900">RawFile</font>} <font color="#990000">=</font> <b><font color="#000000">file:open</font></b>(<font color="#009900">Filename</font>, [<font color="#FF6600">raw</font>, <font color="#FF6600">read</font>, <b><font color="#000080">binary</font></b>]),
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">RawFile</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_upgrading_a_tcp_socket_to_ssl">Upgrading a TCP socket to SSL</h2>
+<p>A connected TCP socket can be upgraded to a SSL socket via the function <code>ranch_ssl:handshake/3</code>. The socket <strong>must</strong> be in <code>{active, false}</code> mode before telling the client that the server is ready to upgrade in order to avoid race conditions.</p>
+<div class="listingblock"><div class="title">Performing a TLS handshake on a TCP socket</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>{<font color="#FF6600">ok</font>, <font color="#009900">NewSocket</font>} <font color="#990000">=</font> <b><font color="#000000">ranch_ssl:handshake</font></b>(<font color="#009900">Socket</font>, <font color="#009900">SslOpts</font>, <font color="#993399">5000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_writing_a_transport_handler">Writing a transport handler</h2>
+<p>A transport handler is a module implementing the <code>ranch_transport</code> behavior. It defines a certain number of callbacks that must be written in order to allow transparent usage of the transport handler.</p>
+<p>The behavior doesn&apos;t define the socket options available when opening a socket. These do not need to be common to all transports as it&apos;s easy enough to write different initialization functions for the different transports that will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong> implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p>
+<p>If the transport handler doesn&apos;t have a native implementation of <code>sendfile/5</code> a fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument is the transport&apos;s module. See <code>ranch_ssl</code> for an example.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/">
+ Listeners
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/">
+ Protocols
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/guide/upcoming_2.0_changes.asciidoc b/docs/en/ranch/1.6/guide/upcoming_2.0_changes.asciidoc
new file mode 100644
index 00000000..d7430901
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/upcoming_2.0_changes.asciidoc
@@ -0,0 +1,34 @@
+[appendix]
+== Upcoming changes in Ranch 2.0
+
+The following changes will be done in Ranch 2.0. In most
+cases an alternative is already available in the most
+recent Ranch version.
+
+* The function `ranch:start_listener/6` has been deprecated
+ in favor of `ranch:start_listener/5`. The number of acceptors
+ was removed and will be taken from the transport options.
+
+* The function `ranch:child_spec/6` has also been deprecated,
+ in favor of `ranch:child_spec/5`.
+
+* The function `ranch:accept_ack/1` has been deprecated in
+ favor of `ranch:handshake/1,2`.
+
+* The function `ranch:info/1,2` will return a map containing
+ each listener's information rather than a list of key/values.
+ The `num_acceptors` key will be removed.
+
+* The socket will no longer be passed to the protocol when
+ starting it. It will be available as a return value from
+ `ranch:handshake/1,2` only.
+
+* Starting from Ranch 2.0 it will no longer be allowed to
+ pass Ranch options along with socket options as a proplist.
+ The only forms allowed will be the `ranch:opts()` map or socket
+ options as-is. The `ranch:opts()` map must be used in case socket
+ options also use a map.
+
+* The `socket` option will be removed. A more viable solution
+ is to define a custom transport module that returns a fresh
+ socket when `Transport:listen/1` is called.
diff --git a/docs/en/ranch/1.6/guide/upcoming_2.0_changes/index.html b/docs/en/ranch/1.6/guide/upcoming_2.0_changes/index.html
new file mode 100644
index 00000000..91c7bd5d
--- /dev/null
+++ b/docs/en/ranch/1.6/guide/upcoming_2.0_changes/index.html
@@ -0,0 +1,179 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Upcoming changes in Ranch 2.0</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Upcoming changes in Ranch 2.0</span></h1>
+
+<p>The following changes will be done in Ranch 2.0. In most cases an alternative is already available in the most recent Ranch version.</p>
+<ul><li>The function <code>ranch:start_listener/6</code> has been deprecated in favor of <code>ranch:start_listener/5</code>. The number of acceptors was removed and will be taken from the transport options.
+</li>
+<li>The function <code>ranch:child_spec/6</code> has also been deprecated, in favor of <code>ranch:child_spec/5</code>.
+</li>
+<li>The function <code>ranch:accept_ack/1</code> has been deprecated in favor of <code>ranch:handshake/1,2</code>.
+</li>
+<li>The function <code>ranch:info/1,2</code> will return a map containing each listener&apos;s information rather than a list of key/values. The <code>num_acceptors</code> key will be removed.
+</li>
+<li>The socket will no longer be passed to the protocol when starting it. It will be available as a return value from <code>ranch:handshake/1,2</code> only.
+</li>
+<li>Starting from Ranch 2.0 it will no longer be allowed to pass Ranch options along with socket options as a proplist. The only forms allowed will be the <code>ranch:opts()</code> map or socket options as-is. The <code>ranch:opts()</code> map must be used in case socket options also use a map.
+</li>
+<li>The <code>socket</code> option will be removed. A more viable solution is to define a custom transport module that returns a fresh socket when <code>Transport:listen/1</code> is called.
+</li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.6/guide/internals/">
+ Internals
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/">
+ Migrating from Ranch 1.5 to 1.6
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/guide">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/index.html b/docs/en/ranch/1.6/manual/index.html
new file mode 100644
index 00000000..41ee98df
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/index.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Ranch Function Reference</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Ranch Function Reference</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch - Socket acceptor pool for TCP protocols</p>
+<h2 id="_description">Description</h2>
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch manages listeners which are a set of processes that accept and manage connections. The connection&apos;s transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.</p>
+<h2 id="_modules">Modules</h2>
+<p>Functions:</p>
+<ul><li><a href="ranch">ranch(3)</a> - Socket acceptor pool
+</li>
+</ul>
+<p>Transports:</p>
+<ul><li><a href="ranch_ssl">ranch_ssl(3)</a> - SSL transport
+</li>
+<li><a href="ranch_tcp">ranch_tcp(3)</a> - TLS transport
+</li>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="ranch_protocol">ranch_protocol(3)</a> - Protocol modules
+</li>
+<li><a href="ranch_transport">ranch_transport(3)</a> - Transport modules
+</li>
+</ul>
+<h2 id="_dependencies">Dependencies</h2>
+<ul><li>ssl - Secure communication over sockets
+</li>
+</ul>
+<p>All these applications must be started before the <code>ranch</code> application. To start Ranch and all dependencies at once:</p>
+<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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_environment">Environment</h2>
+<p>The <code>ranch</code> application defines one application environment configuration parameter.</p>
+<dl><dt>profile (false)</dt>
+<dd><p>When enabled, Ranch will start <code>eprof</code> profiling automatically.</p>
+<p>You can use the <code>ranch_app:profile_output/0</code> function to stop profiling and output the results to the files <em>procs.profile</em> and <em>total.profile</em>. Do not use in production.</p>
+</dd>
+</dl>
+<h2 id="_see_also">See also</h2>
+<p>ssl(7)</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.child_spec/index.html b/docs/en/ranch/1.6/manual/ranch.child_spec/index.html
new file mode 100644
index 00000000..fdb1dccc
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.child_spec/index.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:child_spec(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:child_spec(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:child_spec - Build child specifications for a new listener</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">child_spec</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ref</font></b>(),
+ <font color="#009900">Transport</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>(),
+ <font color="#009900">TransOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch:opts</font></b>(),
+ <font color="#009900">Protocol</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>(),
+ <font color="#009900">ProtoOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">supervisor:child_spec</font></b>()</tt></pre>
+</div></div>
+<p>Build child specifications for a new listener.</p>
+<p>This function can be used to embed a listener directly in an application&apos;s supervision tree.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</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 configuration.</p>
+<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>
+</dd>
+<dt>Transport</dt>
+<dd><p>The transport module that will be used by Ranch to accept connections and that will be passed to the protocol module along with the socket.</p>
+<p>The interface of the transport module is documented in the <a href="../ranch_transport">ranch_transport(3)</a> manual.</p>
+</dd>
+<dt>TransportOpts</dt>
+<dd><p>Transport options include the Ranch-specific options and the socket options. The listener&apos;s port number must be defined in the socket options.</p>
+<p>Socket options may be given directly if there are no Ranch-specific options.</p>
+<p>The available options for the built-in Ranch transports are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> and <a href="../ranch_ssl">ranch_ssl(3)</a> manuals.</p>
+</dd>
+<dt>Protocol</dt>
+<dd><p>The protocol module that will be used by Ranch after the connection has been accepted.</p>
+<p>The interface of the protocol module is documented in the <a href="../ranch_protocol">ranch_protocol(3)</a> manual.</p>
+</dd>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options given when calling the protocol module. Please consult the documentation of the protocol module you are using for more details.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>Child specifications are returned.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.4</strong>: The <code>NumAcceptors</code> argument was moved to the transport options.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Embed 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><b><font color="#000080">-behavior</font></b>(<font color="#FF6600">supervisor</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#990000">_</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, {#{<font color="#0000FF">strategy</font> <font color="#990000">=&gt;</font> <font color="#FF6600">one_for_one</font>}, [
+ <b><font color="#000000">ranch:child_spec</font></b>(<font color="#FF6600">echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+ )
+ ]}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch_tcp">ranch_tcp(3)</a>, <a href="../ranch_ssl">ranch_ssl(3)</a>, <a href="../ranch_transport">ranch_transport(3)</a>, <a href="../ranch_protocol">ranch_protocol(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.get_addr/index.html b/docs/en/ranch/1.6/manual/ranch.get_addr/index.html
new file mode 100644
index 00000000..3ee21278
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.get_addr/index.html
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:get_addr(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_addr(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_addr - Get the listening port and IP</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">get_addr</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#009900">IP</font> <font color="#990000">::</font> <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Get the listening port and IP.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The address of the listener is returned as a tuple.</p>
+<p>The IP address is the IP of the network interface the socket is bound to.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the listening port and IP</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>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:get_addr</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.get_port">ranch:get_port(3)</a>, <a href="../ranch.info">ranch:info(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.get_max_connections/index.html b/docs/en/ranch/1.6/manual/ranch.get_max_connections/index.html
new file mode 100644
index 00000000..e1376fc8
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.get_max_connections/index.html
@@ -0,0 +1,169 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:get_max_connections(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_max_connections(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_max_connections - Get the max number of connections</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">get_max_connections</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">MaxConns</font> <font color="#990000">::</font> <b><font color="#000000">ranch:max_conns</font></b>()</tt></pre>
+</div></div>
+<p>Get the max number of connections.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The maximum number of connections is returned.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the max number of connections</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><font color="#009900">MaxConns</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_max_connections</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_protocol_options">ranch:get_protocol_options(3)</a>, <a href="../ranch.get_transport_options">ranch:get_transport_options(3)</a>, <a href="../ranch.set_max_connections">ranch:set_max_connections(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.get_port/index.html b/docs/en/ranch/1.6/manual/ranch.get_port/index.html
new file mode 100644
index 00000000..ee77e0f2
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.get_port/index.html
@@ -0,0 +1,170 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:get_port(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_port(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_port - Get the listening port</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">get_port</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()</tt></pre>
+</div></div>
+<p>Get the listening port.</p>
+<p>This function is particularly useful to retrieve the listening port number when it was not provided in the options and was chosen randomly instead.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The listening port is returned.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the listening 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><font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.get_addr">ranch:get_addr(3)</a>, <a href="../ranch.info">ranch:info(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.get_protocol_options/index.html b/docs/en/ranch/1.6/manual/ranch.get_protocol_options/index.html
new file mode 100644
index 00000000..58391826
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.get_protocol_options/index.html
@@ -0,0 +1,169 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:get_protocol_options(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_protocol_options(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_protocol_options - Get the current protocol options</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">get_protocol_options</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">ProtoOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Get the current protocol options.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The current protocol options are returned.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the current protocol options</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><font color="#009900">ProtoOpts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_max_connections">ranch:get_max_connections(3)</a>, <a href="../ranch.get_transport_options">ranch:get_transport_options(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.get_status/index.html b/docs/en/ranch/1.6/manual/ranch.get_status/index.html
new file mode 100644
index 00000000..885a586a
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.get_status/index.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:get_status(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_status(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_status - Get a listener&apos;s running state</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">get_status</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ref</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">running</font></b> | <font color="#FF6600">suspended</font></tt></pre>
+</div></div>
+<p>Get a listener&apos;s running state.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An atom is returned indicating the running status of the listener.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get a listener&apos;s running state</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><b><font color="#000000">ranch:get_status</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>, <a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a>, <a href="../ranch.resume_listener">ranch:resume_listener(3)</a>, <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a>, <a href="../ranch.wait_for_connections">ranch:wait_for_connections(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.get_transport_options/index.html b/docs/en/ranch/1.6/manual/ranch.get_transport_options/index.html
new file mode 100644
index 00000000..9ee1af55
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.get_transport_options/index.html
@@ -0,0 +1,169 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:get_transport_options(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_transport_options(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_transport_options - Get the current transport options</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">get_transport_options</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">TransOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Get the current transport options.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The current transport options are returned.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the current transport options</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><font color="#009900">TransOpts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_transport_options</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_max_connections">ranch:get_max_connections(3)</a>, <a href="../ranch.get_protocol_options">ranch:get_protocol_options(3)</a>, <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.handshake/index.html b/docs/en/ranch/1.6/manual/ranch.handshake/index.html
new file mode 100644
index 00000000..322afba2
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.handshake/index.html
@@ -0,0 +1,192 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:handshake(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:handshake(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:handshake - Perform the transport handshake</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">handshake</font></b>(<font color="#009900">Ref</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">handshake</font></b>(<font color="#009900">Ref</font>, [])
+<b><font color="#000000">handshake</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>}
+
+<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Perform the transport handshake.</p>
+<p>This function must be called by the protocol process in order to retrieve the socket for the connection. Ranch performs the handshake necessary to give control of the socket to this process and also does the transport handshake, for example setting up the TLS connection.</p>
+<p>Currently the socket can be obtained from a <code>Protocol:start_link/4</code> argument and as a return value from <code>ranch:handshake/1,2</code>. In Ranch 2.0 the socket will only be available from <code>ranch:handshake/1,2</code>.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>Opts</dt>
+<dd><p>Transport handshake options.</p>
+<p>Allowed options depend on the transport module.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An <code>ok</code> tuple is returned containing the socket for the connection.</p>
+<p>This function will trigger an exception when an error occurs.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: Function introduced. Replaces <code>ranch:accept_ack/1</code>.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Initialize the connection process</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><b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#990000">_</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Pid</font> <font color="#990000">=</font> <b><font color="#000000">proc_lib:spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>,
+ [<font color="#009900">Ref</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>]),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Pid</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#008080">#state</font>{<font color="#0000FF">ref</font><font color="#990000">=</font><font color="#009900">Ref</font>, <font color="#0000FF">socket</font><font color="#990000">=</font><font color="#009900">Socket</font>,
+ <font color="#0000FF">transport</font><font color="#990000">=</font><font color="#009900">Transport</font>, <font color="#0000FF">opts</font><font color="#990000">=</font><font color="#009900">Opts</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.remove_connection">ranch:remove_connection(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.info/index.html b/docs/en/ranch/1.6/manual/ranch.info/index.html
new file mode 100644
index 00000000..0d841789
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.info/index.html
@@ -0,0 +1,217 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:info(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:info(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:info - Overview of Ranch listeners</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">info</font></b>() <font color="#990000">-&gt;</font> [{<font color="#009900">Ref</font>, <font color="#009900">Info</font>}]
+<b><font color="#000000">info</font></b>(<font color="#009900">Ref</font>) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
+
+<font color="#009900">Info</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()}]</tt></pre>
+</div></div>
+<p>Overview of Ranch listeners.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>Returns detailed information about one or all Ranch listeners. The following keys are returned:</p>
+<dl><dt>pid</dt>
+<dd><p>Pid of the listener&apos;s top-level supervisor.</p>
+</dd>
+<dt>status</dt>
+<dd><p>Listener status, either running or suspended.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface Ranch listens on.</p>
+</dd>
+<dt>port</dt>
+<dd><p>Port number Ranch listens on.</p>
+</dd>
+<dt>num_acceptors</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>max_connections</dt>
+<dd><p>Maximum number of connections.</p>
+</dd>
+<dt>active_connections</dt>
+<dd><p>Number of active connections.</p>
+</dd>
+<dt>all_connections</dt>
+<dd><p>Number of connections, including those removed from the count.</p>
+</dd>
+<dt>transport</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>transport_options</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>protocol</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>protocol_options</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<!-- @todo I mistakenly removed the num_acceptors key,-->
+<!-- it should be added back.-->
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get information about all listeners</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><font color="#009900">AllInfo</font> <font color="#990000">=</font> <b><font color="#000000">ranch:info</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get information about a specific 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><font color="#009900">Info</font> <font color="#990000">=</font> <b><font color="#000000">ranch:info</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_addr">ranch:get_addr(3)</a>, <a href="../ranch.get_port">ranch:get_port(3)</a>, <a href="../ranch.procs">ranch:procs(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.procs/index.html b/docs/en/ranch/1.6/manual/ranch.procs/index.html
new file mode 100644
index 00000000..f8c49900
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.procs/index.html
@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:procs(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:procs(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:procs - Retrieve pids from a listener</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">procs</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Type</font> <font color="#990000">::</font> <font color="#FF6600">acceptors</font> | <font color="#FF6600">connections</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Pids</font> <font color="#990000">::</font> [<b><font color="#000080">pid</font></b>()]</tt></pre>
+</div></div>
+<p>Retrieve pids from a listener.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>Type</dt>
+<dd><p>The type of process that will be returned.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>A list of pids is returned.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the pids of the acceptor processes</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><font color="#009900">Pids</font> <font color="#990000">=</font> <b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">acceptors</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the pids of the connection processes</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><font color="#009900">Pids</font> <font color="#990000">=</font> <b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">connections</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_addr">ranch:get_addr(3)</a>, <a href="../ranch.get_port">ranch:get_port(3)</a>, <a href="../ranch.info">ranch:info(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.remove_connection/index.html b/docs/en/ranch/1.6/manual/ranch.remove_connection/index.html
new file mode 100644
index 00000000..373d7de3
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.remove_connection/index.html
@@ -0,0 +1,170 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:remove_connection(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:remove_connection(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:remove_connection - Remove connection from the count</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">remove_connection</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Remove connection from the count.</p>
+<p>This connection will no longer be included in the count when limiting the number of connections. This can be useful in a mixed environment where some connections are active and others are passive. Passive connections spend most of their time idling and are not consuming much resources.</p>
+<p>This function may only be called from a connection process.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Remove the connection process from the count</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><b><font color="#000000">ranch:remove_connection</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.handshake">ranch:handshake(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.resume_listener/index.html b/docs/en/ranch/1.6/manual/ranch.resume_listener/index.html
new file mode 100644
index 00000000..34485248
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.resume_listener/index.html
@@ -0,0 +1,176 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:resume_listener(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:resume_listener(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:resume_listener - Resume a suspended listener</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">resume_listener</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Resume a suspended listener.</p>
+<p>Ranch will start listening for and accepting connections again. The function <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a> can be used to change the transport options before resuming the listener.</p>
+<p>Nothing is done when the listener is already running.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An error tuple is returned when the listener could not be restarted.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Resume 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><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:resume_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>, <a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a>, <a href="../ranch.get_status">ranch:get_status(3)</a>, <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a>, <a href="../ranch.wait_for_connections">ranch:wait_for_connections(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.set_max_connections/index.html b/docs/en/ranch/1.6/manual/ranch.set_max_connections/index.html
new file mode 100644
index 00000000..013d0e28
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.set_max_connections/index.html
@@ -0,0 +1,174 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:set_max_connections(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:set_max_connections(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:set_max_connections - Set the max number of connections</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">set_max_connections</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">MaxConns</font> <font color="#990000">::</font> <b><font color="#000000">ranch:max_conns</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set the max number of connections.</p>
+<p>The change will be applied immediately. If the new value is smaller than the previous one, Ranch will wait for the extra connections to terminate and will not accept new connections until the number of connections goes below the limit.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>MaxConns</dt>
+<dd><p>The new maximum number of connections.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Set the max number of connections</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><b><font color="#000000">ranch:set_max_connections</font></b>(<font color="#FF6600">example</font>, <font color="#993399">10000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_max_connections">ranch:get_max_connections(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a>, <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.set_protocol_options/index.html b/docs/en/ranch/1.6/manual/ranch.set_protocol_options/index.html
new file mode 100644
index 00000000..e734dbe1
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.set_protocol_options/index.html
@@ -0,0 +1,174 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:set_protocol_options(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:set_protocol_options(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:set_protocol_options - Set the protocol options</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">set_protocol_options</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">ProtoOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set the protocol options.</p>
+<p>The change will be applied immediately for all new connections. Old connections will not receive the new options.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>ProtoOpts</dt>
+<dd><p>The new protocol options.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Set the protocol options</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><b><font color="#000000">ranch:set_protocol_options</font></b>(<font color="#FF6600">example</font>, <font color="#009900">ProtoOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.get_protocol_options">ranch:get_protocol_options(3)</a>, <a href="../ranch.set_max_connections">ranch:set_max_connections(3)</a>, <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.set_transport_options/index.html b/docs/en/ranch/1.6/manual/ranch.set_transport_options/index.html
new file mode 100644
index 00000000..f22bbd01
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.set_transport_options/index.html
@@ -0,0 +1,179 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:set_transport_options(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:set_transport_options(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:set_transport_options - Set the transport options</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">set_transport_options</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000080">running</font></b>}</tt></pre>
+</div></div>
+<p>Set the transport options.</p>
+<p>The listener must be suspended for this call to succeed. If the listener is running, <code>{error, running}</code> will be returned.</p>
+<p>The change will take effect when the listener resumes.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>TransOpts</dt>
+<dd><p>The new transport options.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Set the transport options</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><font color="#009900">Ref</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
+
+<font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:suspend_listener</font></b>(<font color="#009900">Ref</font>),
+<font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:set_transport_options</font></b>(<font color="#009900">Ref</font>, <font color="#009900">TransOpts</font>),
+<font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:resume_listener</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a>, <a href="../ranch.resume_listener">ranch:resume_listener(3)</a>, <a href="../ranch.get_transport_options">ranch:get_transport_options(3)</a>, <a href="../ranch.set_max_connections">ranch:set_max_connections(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.start_listener/index.html b/docs/en/ranch/1.6/manual/ranch.start_listener/index.html
new file mode 100644
index 00000000..56cb0cb1
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.start_listener/index.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:start_listener(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:start_listener(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:start_listener - Start a listener</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">start_listener</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ref</font></b>(),
+ <font color="#009900">Transport</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>(),
+ <font color="#009900">TransOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch:opts</font></b>(),
+ <font color="#009900">Protocol</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>(),
+ <font color="#009900">ProtoOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start a listener.</p>
+<p>A listener is a set of processes that accepts and manages connections using the given transport and protocol modules.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</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 configuration.</p>
+<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>
+</dd>
+<dt>Transport</dt>
+<dd><p>The transport module that will be used by Ranch to accept connections and that will be passed to the protocol module along with the socket.</p>
+<p>The interface of the transport module is documented in the <a href="../ranch_transport">ranch_transport(3)</a> manual.</p>
+</dd>
+<dt>TransportOpts</dt>
+<dd><p>Transport options include the Ranch-specific options and the socket options. The listener&apos;s port number must be defined in the socket options.</p>
+<p>Socket options may be given directly if there are no Ranch-specific options.</p>
+<p>The available options for the built-in Ranch transports are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> and <a href="../ranch_ssl">ranch_ssl(3)</a> manuals.</p>
+</dd>
+<dt>Protocol</dt>
+<dd><p>The protocol module that will be used by Ranch after the connection has been accepted.</p>
+<p>The interface of the protocol module is documented in the <a href="../ranch_protocol">ranch_protocol(3)</a> manual.</p>
+</dd>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options given when calling the protocol module. Please consult the documentation of the protocol module you are using for more details.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Ranch is already in use.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.4</strong>: The <code>NumAcceptors</code> argument was moved to the transport options.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">example</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ <font color="#FF6600">cowboy_http2</font>, #{}
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener with Ranch-specific options</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">example</font>,
+ <font color="#FF6600">ranch_tcp</font>, #{
+ <font color="#0000FF">num_acceptors</font> <font color="#990000">=&gt;</font> <font color="#993399">75</font>,
+ <font color="#0000FF">socket_opts</font> <font color="#990000">=&gt;</font> [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}]
+ },
+ <font color="#FF6600">cowboy_http2</font>, #{}
+)<font color="#990000">.</font></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><font color="#009900">Ref</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
+
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#009900">Ref</font>,
+ <font color="#FF6600">ranch_tcp</font>, #{},
+ <font color="#FF6600">cowboy_http2</font>, #{}
+),
+
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.stop_listener">ranch:stop_listener(3)</a>, <a href="../ranch.child_spec">ranch:child_spec(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch_tcp">ranch_tcp(3)</a>, <a href="../ranch_ssl">ranch_ssl(3)</a>, <a href="../ranch_transport">ranch_transport(3)</a>, <a href="../ranch_protocol">ranch_protocol(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.stop_listener/index.html b/docs/en/ranch/1.6/manual/ranch.stop_listener/index.html
new file mode 100644
index 00000000..17d9dbfe
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.stop_listener/index.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch: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/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:stop_listener(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:stop_listener - Stop a listener</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">stop_listener</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">not_found</font>}</tt></pre>
+</div></div>
+<p>Stop a listener.</p>
+<p>The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the <code>shutdown</code> transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.</p>
+<p>In order for the connection processes to exit gracefully, they need to trap exit signals and stop before the configured shutdown timeout. If greater control over the shutdown is required the functions <a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a> and <a href="../ranch.wait_for_connections">ranch:wait_for_connections(3)</a> can be used.</p>
+<p>This function does not return until the listener is completely stopped.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An error tuple is returned when the listener is not found.</p>
+<h2 id="_examples">Examples</h2>
+<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><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:stop_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.child_spec">ranch:child_spec(3)</a>, <a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.suspend_listener/index.html b/docs/en/ranch/1.6/manual/ranch.suspend_listener/index.html
new file mode 100644
index 00000000..0ade506f
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.suspend_listener/index.html
@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:suspend_listener(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:suspend_listener(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:suspend_listener - Suspend a running listener</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">suspend_listener</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Suspend a running listener.</p>
+<p>Ranch will stop listening for and accepting connections and the listening socket will be closed. Existing connections will continue undisturbed. The function <a href="../ranch.wait_for_connections">ranch:wait_for_connections(3)</a> can be used to wait for connections to be closed if necessary.</p>
+<p>Some transport options can only be changed when the listener is suspended. Please consult the <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a> manual for more information.</p>
+<p>Nothing is done when the listener is already suspended.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An error tuple is returned when the listener could not be suspended.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Suspend 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><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:suspend_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.start_listener">ranch:start_listener(3)</a>, <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>, <a href="../ranch.resume_listener">ranch:resume_listener(3)</a>, <a href="../ranch.get_status">ranch:get_status(3)</a>, <a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a>, <a href="../ranch.wait_for_connections">ranch:wait_for_connections(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch.wait_for_connections/index.html b/docs/en/ranch/1.6/manual/ranch.wait_for_connections/index.html
new file mode 100644
index 00000000..b73ed8ec
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch.wait_for_connections/index.html
@@ -0,0 +1,197 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch:wait_for_connections(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:wait_for_connections(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:wait_for_connections - Wait for a specific number of connections</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">wait_for_connections</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Operator</font>,
+ <font color="#009900">NumConns</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Operator</font> <font color="#990000">::</font> <font color="#FF6600">'&gt;'</font> | <font color="#FF6600">'&gt;='</font> | <font color="#FF6600">'=='</font> | <font color="#FF6600">'=&lt;'</font> | <font color="#FF6600">'&lt;'</font></tt></pre>
+</div></div>
+<p>Wait for a specific number of connections.</p>
+<p>This function waits until the number of connections on the given listener becomes higher than, equal to or lower than the given number. It never returns otherwise.</p>
+<p>This function can be used to gracefully shutdown a listener by first suspending the listener and then waiting for connections to terminate before finally stopping the listener.</p>
+<!-- @todo The suspend/wait/stop pattern should be tested.-->
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>Operator</dt>
+<dd><p>The operator to use for the comparison.</p>
+</dd>
+<dt>NumConns</dt>
+<dd><p>The number of connections to reach.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Wait for at least 100 connections</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><b><font color="#000000">ranch:wait_for_connections</font></b>(<font color="#FF6600">example</font>, <font color="#FF6600">'&gt;='</font>, <font color="#993399">100</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Gracefully shutdown 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><font color="#009900">Ref</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
+
+<font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:suspend_listener</font></b>(<font color="#009900">Ref</font>),
+<b><font color="#000000">ranch:wait_for_connections</font></b>(<font color="#009900">Ref</font>, <font color="#FF6600">'=='</font>, <font color="#993399">0</font>),
+<font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:stop_listener</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.stop_listener">ranch:stop_listener(3)</a>, <a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a>, <a href="../ranch.resume_listener">ranch:resume_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch/index.html b/docs/en/ranch/1.6/manual/ranch/index.html
new file mode 100644
index 00000000..dfdce902
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch/index.html
@@ -0,0 +1,280 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch - Socket acceptor pool</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>ranch</code> provides functions for starting and manipulating Ranch listeners.</p>
+<h2 id="_exports">Exports</h2>
+<p>Start/stop:</p>
+<ul><li><a href="../ranch.start_listener">ranch:start_listener(3)</a> - Start a listener
+</li>
+<li><a href="../ranch.stop_listener">ranch:stop_listener(3)</a> - Stop a listener
+</li>
+<li><a href="../ranch.child_spec">ranch:child_spec(3)</a> - Build child specifications for a new listener
+</li>
+</ul>
+<p>Suspend/resume:</p>
+<ul><li><a href="../ranch.suspend_listener">ranch:suspend_listener(3)</a> - Suspend a running listener
+</li>
+<li><a href="../ranch.resume_listener">ranch:resume_listener(3)</a> - Resume a suspended listener
+</li>
+<li><a href="../ranch.get_status">ranch:get_status(3)</a> - Get a listener&apos;s running state
+</li>
+</ul>
+<p>Connections:</p>
+<ul><li>ranch:accept_ack(3) - Deprecated in favor of <a href="../ranch.handshake">ranch:handshake(3)</a>
+</li>
+<li><a href="../ranch.handshake">ranch:handshake(3)</a> - Perform the transport handshake
+</li>
+<li><a href="../ranch.remove_connection">ranch:remove_connection(3)</a> - Remove connection from the count
+</li>
+</ul>
+<p>Options:</p>
+<ul><li><a href="../ranch.get_max_connections">ranch:get_max_connections(3)</a> - Get the max number of connections
+</li>
+<li><a href="../ranch.get_protocol_options">ranch:get_protocol_options(3)</a> - Get the current protocol options
+</li>
+<li><a href="../ranch.get_transport_options">ranch:get_transport_options(3)</a> - Get the current transport options
+</li>
+<li><a href="../ranch.set_max_connections">ranch:set_max_connections(3)</a> - Set the max number of connections
+</li>
+<li><a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a> - Set the protocol options
+</li>
+<li><a href="../ranch.set_transport_options">ranch:set_transport_options(3)</a> - Set the transport options
+</li>
+</ul>
+<p>Introspection:</p>
+<ul><li><a href="../ranch.get_addr">ranch:get_addr(3)</a> - Get the listening port and IP
+</li>
+<li><a href="../ranch.get_port">ranch:get_port(3)</a> - Get the listening port
+</li>
+<li><a href="../ranch.info">ranch:info(3)</a> - Overview of Ranch listeners
+</li>
+<li><a href="../ranch.procs">ranch:procs(3)</a> - Retrieve pids from a listener
+</li>
+<li><a href="../ranch.wait_for_connections">ranch:wait_for_connections(3)</a> - Wait for a specific number of connections
+</li>
+</ul>
+<h2 id="_types">Types</h2>
+<h3 id="_max_conns">max_conns()</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><b><font color="#000000">max_conns</font></b>() <font color="#990000">=</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font></tt></pre>
+</div></div>
+<p>Maximum number of connections allowed on this listener.</p>
+<p>This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</p>
+<h3 id="_opt">opt()</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><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">ack_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">connection_type</font>, <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>}
+ | {<font color="#FF6600">max_connections</font>, <b><font color="#000000">max_conns</font></b>()}
+ | {<font color="#FF6600">num_acceptors</font>, <b><font color="#000000">pos_integer</font></b>()}
+ | {<font color="#000080">shutdown</font>, <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>}
+ | {<font color="#FF6600">socket</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Deprecated form for Ranch-specific options.</p>
+<p>Please use the <code>opts()</code> type when you need to provide Ranch-specific transport options. Socket options will remain separate from the Ranch-specific options.</p>
+<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><b><font color="#000000">opts</font></b>() <font color="#990000">=</font> <b><font color="#000000">any</font></b>() | #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">handshake_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_connections</font> <font color="#990000">=&gt;</font> <b><font color="#000000">max_conns</font></b>(),
+ <font color="#0000FF">logger</font> <font color="#990000">=&gt;</font> <b><font color="#000000">module</font></b>(),
+ <font color="#0000FF">num_acceptors</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
+ <font color="#000080">shutdown</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>,
+ <font color="#0000FF">socket</font> <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>(),
+ <font color="#0000FF">socket_opts</font> <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()
+}</tt></pre>
+</div></div>
+<p>Transport options.</p>
+<p>The transport options are a combination of Ranch-specific options and socket options. Socket options may be given directly (assuming they are not a map and no Ranch-specific option needs to be given) or as part of <code>socket_opts</code>.</p>
+<p>None of the options are required.</p>
+<dl><dt>ack_timeout</dt>
+<dd><p>When <code>ack_timeout</code> is found in a transport options proplist, it is converted to the <code>handshake_timeout</code> option from the map. They are equivalent. The <code>ack_timeout</code> option will be removed in Ranch 2.0.</p>
+</dd>
+<dt>connection_type (worker)</dt>
+<dd><p>Type of process that will handle the connection.</p>
+</dd>
+<dt>handshake_timeout (5000)</dt>
+<dd><p>Maximum allowed time for the <code>ranch:handshake/1,2</code> call to finish.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections. Soft limit. Use <code>infinity</code> to disable the limit entirely.</p>
+</dd>
+<dt>num_acceptors (10)</dt>
+<dd><p>Number of processes that accept connections.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket</dt>
+<dd><p>Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>. This option will be removed in Ranch 2.0. Use a custom transport module acting as a wrapper for <code>ranch_tcp</code> or <code>ranch_ssl</code> instead.</p>
+</dd>
+<dt>socket_opts</dt>
+<dd><p>Socket options given to <code>Transport:listen/1</code>. Please refer to the documentation of the transport module you are using for more details.</p>
+</dd>
+</dl>
+<h3 id="_ref">ref()</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><b><font color="#000000">ref</font></b>() <font color="#990000">=</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Unique name used to refer to a listener.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: The <code>logger</code> option was added.
+</li>
+<li><strong>1.6</strong>: The <code>opt()</code> type was deprecated in favor of the new <code>opts()</code> type.
+</li>
+</ul>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">ranch(7)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch_app/index.html b/docs/en/ranch/1.6/manual/ranch_app/index.html
new file mode 100644
index 00000000..9d76345c
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch_app/index.html
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch(7)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch(7)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch - Socket acceptor pool for TCP protocols</p>
+<h2 id="_description">Description</h2>
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch manages listeners which are a set of processes that accept and manage connections. The connection&apos;s transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.</p>
+<h2 id="_modules">Modules</h2>
+<p>Functions:</p>
+<ul><li><a href="../ranch">ranch(3)</a> - Socket acceptor pool
+</li>
+</ul>
+<p>Transports:</p>
+<ul><li><a href="../ranch_ssl">ranch_ssl(3)</a> - SSL transport
+</li>
+<li><a href="../ranch_tcp">ranch_tcp(3)</a> - TLS transport
+</li>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="../ranch_protocol">ranch_protocol(3)</a> - Protocol modules
+</li>
+<li><a href="../ranch_transport">ranch_transport(3)</a> - Transport modules
+</li>
+</ul>
+<h2 id="_dependencies">Dependencies</h2>
+<ul><li>ssl - Secure communication over sockets
+</li>
+</ul>
+<p>All these applications must be started before the <code>ranch</code> application. To start Ranch and all dependencies at once:</p>
+<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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_environment">Environment</h2>
+<p>The <code>ranch</code> application defines one application environment configuration parameter.</p>
+<dl><dt>profile (false)</dt>
+<dd><p>When enabled, Ranch will start <code>eprof</code> profiling automatically.</p>
+<p>You can use the <code>ranch_app:profile_output/0</code> function to stop profiling and output the results to the files <em>procs.profile</em> and <em>total.profile</em>. Do not use in production.</p>
+</dd>
+</dl>
+<h2 id="_see_also">See also</h2>
+<p>ssl(7)</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch_protocol/index.html b/docs/en/ranch/1.6/manual/ranch_protocol/index.html
new file mode 100644
index 00000000..89c1e13c
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch_protocol/index.html
@@ -0,0 +1,169 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch_protocol(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_protocol(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_protocol - Protocol modules</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>ranch_protocol</code> defines the interface used by Ranch protocols.</p>
+<h2 id="_callbacks">Callbacks</h2>
+<p>Ranch protocols implement the following interface:</p>
+<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><b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#990000">_</font>,
+ <font color="#009900">Transport</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>(),
+ <font color="#009900">ProtoOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">SupPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>(), <font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}</tt></pre>
+</div></div>
+<p>Start a new connection process.</p>
+<p>The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid. This function will always be called from inside a supervisor.</p>
+<p>This callback can also return two pids. The first pid is the pid of the process that will be supervised. The second pid is the pid of the process that will receive ownership of the socket. This second process must be a child of the first. This form is only available when <code>connection_type</code> is set to <code>supervisor</code>.</p>
+<p>If any other value is returned, the supervisor will close the socket and assume no process has been started.</p>
+<p>Do not perform any operations in this callback, as this would block the supervisor responsible for starting connection processes and degrade performance severely.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: The second argument <code>Socket</code> was deprecated and will be removed in Ranch 2.0. The socket should be obtained by calling <a href="../ranch.handshake">ranch:handshake(3)</a>.
+</li>
+</ul>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.handshake">ranch:handshake(3)</a>, <a href="..">ranch(7)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch_ssl/index.html b/docs/en/ranch/1.6/manual/ranch_ssl/index.html
new file mode 100644
index 00000000..298367c4
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch_ssl/index.html
@@ -0,0 +1,321 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch_ssl(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_ssl(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_ssl - SSL transport</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>ranch_ssl</code> implements an SSL Ranch transport.</p>
+<h2 id="_exports">Exports</h2>
+<p>The module <code>ranch_ssl</code> implements the interface defined by <a href="../ranch_transport">ranch_transport(3)</a>.</p>
+<h2 id="_types">Types</h2>
+<h3 id="_opt">opt()</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><b><font color="#000000">opt</font></b>() <font color="#990000">::</font> <b><font color="#000000">ranch_tcp:opt</font></b>() | <b><font color="#000000">ssl_opt</font></b>()</tt></pre>
+</div></div>
+<p>Listen options.</p>
+<p>The TCP options are defined in <a href="../ranch_tcp">ranch_tcp(3)</a>.</p>
+<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><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> [<b><font color="#000000">opt</font></b>()]</tt></pre>
+</div></div>
+<p>List of listen options.</p>
+<h3 id="_ssl_opt">ssl_opt()</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><b><font color="#000000">ssl_opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">alpn_preferred_protocols</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">beast_mitigation</font>, <font color="#FF6600">one_n_minus_one</font> | <font color="#FF6600">zero_n</font> | <font color="#FF6600">disabled</font>}
+ | {<font color="#FF6600">cacertfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">cacerts</font>, [<b><font color="#000000">public_key:der_encoded</font></b>()]}
+ | {<font color="#FF6600">cert</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">certfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">ciphers</font>, [<b><font color="#000000">ssl:erl_cipher_suite</font></b>()] | <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">client_renegotiation</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">crl_cache</font>, {<b><font color="#000000">module</font></b>(), {<font color="#FF6600">internal</font> | <b><font color="#000000">any</font></b>(), <b><font color="#000080">list</font></b>()}}}
+ | {<font color="#FF6600">crl_check</font>, <b><font color="#000000">boolean</font></b>() | <font color="#FF6600">peer</font> | <font color="#FF6600">best_effort</font>}
+ | {<font color="#FF6600">depth</font>, <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">255</font>}
+ | {<font color="#FF6600">dh</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">dhfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">fail_if_no_peer_cert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">hibernate_after</font>, <b><font color="#000080">integer</font></b>() | <font color="#000080">undefined</font>}
+ | {<font color="#FF6600">honor_cipher_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">key</font>, {<font color="#FF6600">'RSAPrivateKey'</font> | <font color="#FF6600">'DSAPrivateKey'</font> | <font color="#FF6600">'PrivateKeyInfo'</font>,
+ <b><font color="#000000">public_key:der_encoded</font></b>()}}
+ | {<font color="#FF6600">keyfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">log_alert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">next_protocols_advertised</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">padding_check</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">partial_chain</font>, <b><font color="#0000FF">fun</font></b>(([<b><font color="#000000">public_key:der_encoded</font></b>()])
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">trusted_ca</font>, <b><font color="#000000">public_key:der_encoded</font></b>()} | <font color="#FF6600">unknown_ca</font>)}
+ | {<font color="#FF6600">password</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">psk_identity</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">reuse_session</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">reuse_sessions</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">secure_renegotiate</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">signature_algs</font>, [{<b><font color="#000080">atom</font></b>(), <b><font color="#000080">atom</font></b>()}]}
+ | {<font color="#FF6600">sni_fun</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">sni_hosts</font>, [{<b><font color="#000000">string</font></b>(), <b><font color="#000000">ssl_opt</font></b>()}]}
+ | {<font color="#FF6600">user_lookup_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">v2_hello_compatible</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">verify</font>, <b><font color="#000000">ssl:verify_type</font></b>()}
+ | {<font color="#FF6600">verify_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">versions</font>, [<b><font color="#000080">atom</font></b>()]}</tt></pre>
+</div></div>
+<p>SSL-specific listen options.</p>
+<p>Specifying a certificate is mandatory, either through the <code>cert</code> or <code>certfile</code> option, or by configuring SNI. None of the other options are required.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>alpn_preferred_protocols</dt>
+<dd><p>Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.</p>
+</dd>
+<dt>beast_mitigation</dt>
+<dd><p>Change the BEAST mitigation strategy for SSL-3.0 and TLS-1.0 to interoperate with legacy software.</p>
+</dd>
+<dt>cacertfile</dt>
+<dd><p>Path to PEM encoded trusted certificates file used to verify peer certificates.</p>
+</dd>
+<dt>cacerts</dt>
+<dd><p>List of DER encoded trusted certificates.</p>
+</dd>
+<dt>cert</dt>
+<dd><p>DER encoded user certificate.</p>
+</dd>
+<dt>certfile</dt>
+<dd><p>Path to the PEM encoded user certificate file. May also contain the private key.</p>
+</dd>
+<dt>ciphers</dt>
+<dd><p>List of ciphers that clients are allowed to use.</p>
+</dd>
+<dt>client_renegotiation (true)</dt>
+<dd><p>Whether to allow client-initiated renegotiation.</p>
+</dd>
+<dt>crl_cache ({ssl_crl_cache, {internal, []}})</dt>
+<dd><p>Customize the module used to cache Certificate Revocation Lists.</p>
+</dd>
+<dt>crl_check (false)</dt>
+<dd><p>Whether to perform CRL check on all certificates in the chain during validation.</p>
+</dd>
+<dt>depth (1)</dt>
+<dd><p>Maximum of intermediate certificates allowed in the certification path.</p>
+</dd>
+<dt>dh</dt>
+<dd><p>DER encoded Diffie-Hellman parameters.</p>
+</dd>
+<dt>dhfile</dt>
+<dd><p>Path to the PEM encoded Diffie-Hellman parameters file.</p>
+</dd>
+<dt>fail_if_no_peer_cert (false)</dt>
+<dd><p>Whether to refuse the connection if the client sends an empty certificate.</p>
+</dd>
+<dt>hibernate_after (undefined)</dt>
+<dd><p>Time in ms after which SSL socket processes go into hibernation to reduce memory usage.</p>
+</dd>
+<dt>honor_cipher_order (false)</dt>
+<dd><p>If true, use the server&apos;s preference for cipher selection. If false, use the client&apos;s preference.</p>
+</dd>
+<dt>key</dt>
+<dd><p>DER encoded user private key.</p>
+</dd>
+<dt>keyfile</dt>
+<dd><p>Path to the PEM encoded private key file, if different from the certfile.</p>
+</dd>
+<dt>log_alert (true)</dt>
+<dd><p>If false, error reports will not be displayed.</p>
+</dd>
+<dt>next_protocols_advertised</dt>
+<dd><p>List of protocols to send to the client if it supports the Next Protocol extension.</p>
+</dd>
+<dt>padding_check</dt>
+<dd><p>Allow disabling the block cipher padding check for TLS-1.0 to be able to interoperate with legacy software.</p>
+</dd>
+<dt>partial_chain</dt>
+<dd><p>Claim an intermediate CA in the chain as trusted.</p>
+</dd>
+<dt>password</dt>
+<dd><p>Password to the private key file, if password protected.</p>
+</dd>
+<dt>psk_identity</dt>
+<dd><p>Provide the given PSK identity hint to the client during the handshake.</p>
+</dd>
+<dt>reuse_session</dt>
+<dd><p>Custom policy to decide whether a session should be reused.</p>
+</dd>
+<dt>reuse_sessions (false)</dt>
+<dd><p>Whether to allow session reuse.</p>
+</dd>
+<dt>secure_renegotiate (false)</dt>
+<dd><p>Whether to reject renegotiation attempts that do not conform to RFC5746.</p>
+</dd>
+<dt>signature_algs</dt>
+<dd><p>The TLS signature algorithm extension may be used, from TLS 1.2, to negotiate which signature algorithm to use during the TLS handshake.</p>
+</dd>
+<dt>sni_fun</dt>
+<dd><p>Function called when the client requests a host using Server Name Indication. Returns options to apply.</p>
+</dd>
+<dt>sni_hosts</dt>
+<dd><p>Options to apply for the host that matches what the client requested with Server Name Indication.</p>
+</dd>
+<dt>user_lookup_fun</dt>
+<dd><p>Function called to determine the shared secret when using PSK, or provide parameters when using SRP.</p>
+</dd>
+<dt>v2_hello_compatible</dt>
+<dd><p>Accept clients that send hello messages in SSL-2.0 format while offering supported SSL/TLS versions.</p>
+</dd>
+<dt>verify (verify_none)</dt>
+<dd><p>Use <code>verify_peer</code> to request a certificate from the client.</p>
+</dd>
+<dt>verify_fun</dt>
+<dd><p>Custom policy to decide whether a client certificate is valid.</p>
+</dd>
+<dt>versions</dt>
+<dd><p>TLS protocol versions that will be supported.</p>
+</dd>
+</dl>
+<p>Note that the client will not send a certificate unless the value for the <code>verify</code> option is set to <code>verify_peer</code>. This means that <code>fail_if_no_peer_cert</code> only applies when combined with the <code>verify</code> option. The <code>verify_fun</code> option allows greater control over the client certificate validation.</p>
+<p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">ranch(7)</a>, <a href="../ranch_transport">ranch_transport(3)</a>, <a href="../ranch_tcp">ranch_tcp(3)</a>, ssl(3)</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch_tcp/index.html b/docs/en/ranch/1.6/manual/ranch_tcp/index.html
new file mode 100644
index 00000000..53bc475c
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch_tcp/index.html
@@ -0,0 +1,268 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch_tcp(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_tcp(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_tcp - TCP transport</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>ranch_tcp</code> implements a TCP Ranch transport.</p>
+<p>The function <code>sendfile</code> may not work correctly when used against files stored in a VirtualBox shared folder.</p>
+<h2 id="_exports">Exports</h2>
+<p>The module <code>ranch_tcp</code> implements the interface defined by <a href="../ranch_transport">ranch_transport(3)</a>.</p>
+<h2 id="_types">Types</h2>
+<h3 id="_opt">opt()</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><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">backlog</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">buffer</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">delay_send</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">dontroute</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">exit_on_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">fd</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | <font color="#FF6600">inet</font>
+ | <font color="#FF6600">inet6</font>
+ | {<font color="#FF6600">ip</font>, <b><font color="#000000">inet:ip_address</font></b>()}
+ | {<font color="#FF6600">ipv6_v6only</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">keepalive</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">linger</font>, {<b><font color="#000000">boolean</font></b>(), <b><font color="#000000">non_neg_integer</font></b>()}}
+ | {<font color="#FF6600">low_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">low_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">nodelay</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">port</font>, <b><font color="#000000">inet:port_number</font></b>()}
+ | {<b><font color="#000080">priority</font></b>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">raw</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">recbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">send_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">send_timeout_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">sndbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">tos</font>, <b><font color="#000080">integer</font></b>()}</tt></pre>
+</div></div>
+<p>Listen options.</p>
+<p>Note that additional options may be set by the protocol module using <code>Transport:setopts/2</code>.</p>
+<p>None of the options are required.</p>
+<p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more thorough description of these options. This manual only aims to provide a short description along with what the defaults are. Defaults may be different in Ranch compared to <code>gen_tcp</code>. Defaults are given next to the option name:</p>
+<dl><dt>backlog (1024)</dt>
+<dd><p>Max length of the queue of pending connections.</p>
+</dd>
+<dt>buffer</dt>
+<dd><p>Size of the buffer used by the Erlang driver. Default is system-dependent.</p>
+</dd>
+<dt>delay_send (false)</dt>
+<dd><p>Always queue data before sending, to send fewer, larger packets over the network.</p>
+</dd>
+<dt>dontroute (false)</dt>
+<dd><p>Don&apos;t send via a gateway, only send to directly connected hosts.</p>
+</dd>
+<dt>exit_on_close (true)</dt>
+<dd><p>Disable to allow sending data after a close has been detected.</p>
+</dd>
+<dt>fd</dt>
+<dd><p>File descriptor of the socket, if it was opened externally.</p>
+</dd>
+<dt>high_msgq_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the socket message queue before the queue becomes busy.</p>
+</dd>
+<dt>high_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the ERTS socket implementation&apos;s queue before the socket becomes busy.</p>
+</dd>
+<dt>inet</dt>
+<dd><p>Set up the socket for IPv4.</p>
+</dd>
+<dt>inet6</dt>
+<dd><p>Set up the socket for IPv6.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface to listen on. Listen on all interfaces by default.</p>
+</dd>
+<dt>ipv6_v6only (false)</dt>
+<dd><p>Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.</p>
+</dd>
+<dt>keepalive (false)</dt>
+<dd><p>Enable sending of keep-alive messages.</p>
+</dd>
+<dt>linger ({false, 0})</dt>
+<dd><p>Whether to wait and how long to flush data sent before closing the socket.</p>
+</dd>
+<dt>low_msgq_watermark (4096)</dt>
+<dd><p>Amount of data in the socket message queue before the queue leaves busy state.</p>
+</dd>
+<dt>low_watermark (4096)</dt>
+<dd><p>Amount of data in the ERTS socket implementation&apos;s queue before the socket leaves busy state.</p>
+</dd>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
+</dd>
+<dt>port (0)</dt>
+<dd><p>TCP port number to listen on. 0 means a random port will be used.</p>
+</dd>
+<dt>priority (0)</dt>
+<dd><p>Priority value for all packets to be sent on this socket.</p>
+</dd>
+<dt>recbuf</dt>
+<dd><p>Minimum size of the socket&apos;s receive buffer. Default is system-dependent.</p>
+</dd>
+<dt>send_timeout (30000)</dt>
+<dd><p>How long the send call may wait for confirmation before returning.</p>
+</dd>
+<dt>send_timeout_close (true)</dt>
+<dd><p>Whether to close the socket when the confirmation wasn&apos;t received.</p>
+</dd>
+<dt>sndbuf</dt>
+<dd><p>Minimum size of the socket&apos;s send buffer. Default is system-dependent.</p>
+</dd>
+<dt>tos</dt>
+<dd><p>Value for the IP_TOS IP level option. Use with caution.</p>
+</dd>
+</dl>
+<p>In addition, the <code>raw</code> option can be used to set system-specific options by specifying the protocol level, the option number and the actual option value specified as a binary. This option is not portable. Use with caution.</p>
+<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><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> [<b><font color="#000000">opt</font></b>()]</tt></pre>
+</div></div>
+<p>List of listen options.</p>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">ranch(7)</a>, <a href="../ranch_transport">ranch_transport(3)</a>, <a href="../ranch_ssl">ranch_ssl(3)</a>, gen_tcp(3), inet(3)</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch_transport.sendfile/index.html b/docs/en/ranch/1.6/manual/ranch_transport.sendfile/index.html
new file mode 100644
index 00000000..21d0d6a9
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch_transport.sendfile/index.html
@@ -0,0 +1,204 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch_transport:sendfile(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_transport:sendfile(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_transport:sendfile - Send a file on the socket</p>
+<h2 id="_description">Description</h2>
+<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><b><font color="#000000">sendfile</font></b>(<font color="#009900">Transport</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>(),
+ <font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">ranch_transport:socket</font></b>(),
+ <font color="#009900">File</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>() | <b><font color="#000000">file:fd</font></b>(),
+ <font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#009900">Bytes</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_transport:sendfile_opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Send a file on the socket.</p>
+<p>The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.</p>
+<p>This function emulates the function <code>file:sendfile/2,4,5</code> and may be used when transports are not manipulating TCP directly.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Transport</dt>
+<dd><p>The transport module.</p>
+</dd>
+<dt>Socket</dt>
+<dd><p>The socket.</p>
+</dd>
+<dt>File</dt>
+<dd><p>The filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset</dt>
+<dd><p>Start position in the file, in bytes.</p>
+</dd>
+<dt>Bytes</dt>
+<dd><p>Length in bytes.</p>
+</dd>
+<dt>Opts</dt>
+<dd><p>Additional options.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The number of bytes actually sent is returned on success inside an <code>ok</code> tuple.</p>
+<p>An <code>error</code> tuple is returned otherwise.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: The type of the <code>File</code> argument was extended.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Implement Transport:sendfile using the fallback</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><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>, <font color="#993399">0</font>, <font color="#993399">0</font>, [])<font color="#990000">.</font>
+
+<b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, [])<font color="#990000">.</font>
+
+<b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">ranch_transport:sendfile</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#009900">Socket</font>,
+ <font color="#009900">File</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch_transport">ranch_transport(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.6/manual/ranch_transport/index.html b/docs/en/ranch/1.6/manual/ranch_transport/index.html
new file mode 100644
index 00000000..8988f3ab
--- /dev/null
+++ b/docs/en/ranch/1.6/manual/ranch_transport/index.html
@@ -0,0 +1,369 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: ranch_transport(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=2" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_transport(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_transport - Transport modules</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>ranch_transport</code> defines the interface used by Ranch transports.</p>
+<h2 id="_callbacks">Callbacks</h2>
+<p>Ranch transports implement the following interface:</p>
+<h3 id="_accept">accept</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><b><font color="#000000">accept</font></b>(<font color="#009900">LSocket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">closed</font> | <font color="#FF6600">timeout</font> | <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Use the listening socket returned by <code>listen/1</code> to accept a new connection. The timeout is specified in milliseconds.</p>
+<h3 id="_close">close</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><b><font color="#000000">close</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Close the socket.</p>
+<h3 id="_controlling_process">controlling_process</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><b><font color="#000000">controlling_process</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">Pid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">closed</font> | <font color="#FF6600">not_owner</font> | <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Assign a new controlling process to the socket. The controlling process is the process that is linked to and receives messages from the socket.</p>
+<h3 id="_getopts">getopts</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><b><font color="#000000">getopts</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">SockOpts</font> <font color="#990000">::</font> [<b><font color="#000080">atom</font></b>()])
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <b><font color="#000000">any</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Get one or more options for the socket.</p>
+<h3 id="_getstat">getstat</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><b><font color="#000000">getstat</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">SockStatValues</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Get all statistics for the socket.</p>
+<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><b><font color="#000000">getstat</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">SockStats</font> <font color="#990000">::</font> [<b><font color="#000080">atom</font></b>()])
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">SockStatValues</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Get one or more statistic options for the socket.</p>
+<h3 id="_handshake">handshake</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><b><font color="#000000">handshake</font></b>(<font color="#009900">Socket0</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(),
+ <font color="#009900">SockOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>(),
+ <font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>}</tt></pre>
+</div></div>
+<p>Perform the transport-level handshake.</p>
+<p>This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and return a socket that is ready to use.</p>
+<p>This function may also be used to upgrade a connection from a transport to another depending on the capabilities of the transports. For example a <code>ranch_tcp</code> socket may be upgraded to a <code>ranch_ssl</code> one using this function.</p>
+<h3 id="_listen">listen</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><b><font color="#000000">listen</font></b>(<font color="#009900">SockOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">LSocket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Create a socket that listens on the given port.</p>
+<p>The port may not be specified or may be set to 0, which means a random available port number will be chosen.</p>
+<h3 id="_messages">messages</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><b><font color="#000000">messages</font></b>()
+ <font color="#990000">-&gt;</font> {<font color="#009900">OK</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Closed</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Error</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Return the tuple keys for the messages sent by the socket.</p>
+<h3 id="_name">name</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><b><font color="#000080">name</font></b>() <font color="#990000">-&gt;</font> <font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>Return the name of the transport.</p>
+<h3 id="_peername">peername</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><b><font color="#000000">peername</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}}
+ | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Return the address and port number for the other end of the connection.</p>
+<h3 id="_recv">recv</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><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(),
+ <font color="#009900">Length</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Packet</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">closed</font> | <font color="#FF6600">timeout</font> | <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Receive a packet from the socket in passive mode.</p>
+<p>Attempting to receive data from a socket that is in active mode will return an error.</p>
+<p>A length of 0 will return the data available on the socket as soon as possible, regardless of length.</p>
+<p>While it is possible to use the timeout value <code>infinity</code>, it is highly discouraged as it could cause your process to get stuck waiting for data that will never come. This may happen when a socket becomes half-open due to a crash of the remote endpoint. Wi-Fi going down is another common culprit.</p>
+<h3 id="_secure">secure</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><b><font color="#000000">secure</font></b>() <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether the transport can be used for secure connections.</p>
+<h3 id="_send">send</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><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">Packet</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Send a packet on the socket.</p>
+<h3 id="_sendfile">sendfile</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><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>, <font color="#993399">0</font>, <font color="#993399">0</font>, [])
+
+<b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">File</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, [])
+
+<b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(),
+ <font color="#009900">File</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>() | <b><font color="#000000">file:fd</font></b>(),
+ <font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#009900">Bytes</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">sendfile_opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Send a file on the socket.</p>
+<p>The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.</p>
+<p>Transports that manipulate TCP directly may use the <code>file:sendfile/2,4,5</code> function, which calls the <code>sendfile</code> syscall where applicable (on Linux, for example). Other transports can use the <code>sendfile/6</code> function exported from this module.</p>
+<h3 id="_setopts">setopts</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><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">SockOpts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Set one or more options for the socket.</p>
+<h3 id="_shutdown">shutdown</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><font color="#000080">shutdown</font>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(),
+ <font color="#009900">How</font> <font color="#990000">::</font> <font color="#FF6600">read</font> | <font color="#FF6600">write</font> | <font color="#FF6600">read_write</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Close the socket for reading and/or writing.</p>
+<h3 id="_sockname">sockname</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><b><font color="#000000">sockname</font></b>(<font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}}
+ | {<font color="#FF6600">error</font>, <b><font color="#000080">atom</font></b>()}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Return the address and port number for the local end of the connection.</p>
+<h2 id="_exports">Exports</h2>
+<p>The following function can be used when implementing transport modules:</p>
+<ul><li><a href="../ranch_transport.sendfile">ranch_transport:sendfile(3)</a> - Send a file on the socket
+</li>
+</ul>
+<h2 id="_types">Types</h2>
+<h3 id="_sendfile_opts">sendfile_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><b><font color="#000000">sendfile_opts</font></b>() <font color="#990000">::</font> [{<font color="#FF6600">chunk_size</font>, <b><font color="#000000">non_neg_integer</font></b>()}]</tt></pre>
+</div></div>
+<p>Options accepted by the sendfile function and callbacks:</p>
+<dl><dt>chunk_size (8191)</dt>
+<dd><p>The chunk size, in bytes.</p>
+</dd>
+</dl>
+<h3 id="_socket">socket()</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><b><font color="#000000">socket</font></b>() <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>The socket.</p>
+<p>The exact type will vary depending on the transport module.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.6</strong>: The <code>socket()</code> type was added for documentation purposes.
+</li>
+<li><strong>1.6</strong>: The type of the sendfile filename was extended.
+</li>
+</ul>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">ranch(7)</a>, <a href="../ranch_tcp">ranch_tcp(3)</a>, <a href="../ranch_ssl">ranch_ssl(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.6
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.6/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/index.html b/docs/index.html
index b6c9cfe7..a7ff0454 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -146,6 +146,13 @@
<ul>
+ <li><a href="/docs/en/ranch/1.6/guide">Ranch 1.6 User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.6/manual">Ranch 1.6 Function Reference</a></li>
+
+
+
<li><a href="/docs/en/ranch/1.5/guide">Ranch 1.5 User Guide</a></li>
diff --git a/docs/index.xml b/docs/index.xml
index 33a58867..2d2d5c42 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -86,6 +86,18 @@ Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Win
</item>
<item>
+ <title>Introduction</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/introduction/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/introduction/</guid>
+ <description>Ranch is a socket acceptor pool for TCP protocols.
+Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
+Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
+Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
+ </item>
+
+ <item>
<title>The modern Web</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/modern_web/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -242,6 +254,16 @@ The listener takes care of supervising all the acceptor and connection processes
</item>
<item>
+ <title>Listeners</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/</guid>
+ <description>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 use of transport handlers.
+The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
+ </item>
+
+ <item>
<title>Starting and stopping</title>
<link>https://ninenines.eu/docs/en/gun/1.0/guide/start/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -378,6 +400,19 @@ Ranch depends on ssl by default so any necessary dependencies will start when Ra
</item>
<item>
+ <title>Transports</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/transports/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/transports/</guid>
+ <description>A transport defines the interface to interact with a socket.
+Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
+TCP transport The TCP transport is a thin wrapper around gen_tcp.
+SSL transport The SSL transport is a thin wrapper around ssl.
+Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
+ </item>
+
+ <item>
<title>Overview</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/overview/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -440,6 +475,16 @@ Writing a protocol handler All protocol handlers must implement the ranch_protoc
</item>
<item>
+ <title>Protocols</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/</guid>
+ <description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
+ </item>
+
+ <item>
<title>Getting started</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -553,6 +598,16 @@ Embedding To embed Ranch in your application you can simply add the child specs
</item>
<item>
+ <title>Embedded mode</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/</guid>
+ <description>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.
+Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
+ </item>
+
+ <item>
<title>Limitations</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -681,6 +736,17 @@ This chapter isn&amp;apos;t specifically about Ranch, we assume here that you kn
</item>
<item>
+ <title>Writing parsers</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/</guid>
+ <description>There are three kinds of protocols:
+Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
+This chapter isn&amp;apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;apos;t been parsed is saved in a buffer.</description>
+ </item>
+
+ <item>
<title>Building</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/app/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -788,6 +854,16 @@ The server only needs to retain the certificate serial number and the certificat
</item>
<item>
+ <title>SSL client authentication</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/</guid>
+ <description>Purpose SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.
+The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
+ </item>
+
+ <item>
<title>Packages and dependencies</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/deps/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -910,6 +986,16 @@ Note that for everything related to efficiency and performance, you should perfo
</item>
<item>
+ <title>Internals</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/internals/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/internals/</guid>
+ <description>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.
+Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
+ </item>
+
+ <item>
<title>Constraints</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -981,6 +1067,16 @@ RELX_CONFIG = $(CURDIR)/webchat.config Relx does not need to be installed. Erla
</item>
<item>
+ <title>Upcoming changes in Ranch 2.0</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/</guid>
+ <description>The following changes will be done in Ranch 2.0. In most cases an alternative is already available in the most recent Ranch version.
+The function ranch:start_listener/6 has been deprecated in favor of ranch:start_listener/5. The number of acceptors was removed and will be taken from the transport options. The function ranch:child_spec/6 has also been deprecated, in favor of ranch:child_spec/5. The function ranch:accept_ack/1 has been deprecated in favor of ranch:handshake/1,2. The function ranch:info/1,2 will return a map containing each listener&amp;apos;s information rather than a list of key/values.</description>
+ </item>
+
+ <item>
<title>Self-extracting releases</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1070,6 +1166,17 @@ Requirements Erlang.mk uses p7zip by default to generate the escript archive. Ma
</item>
<item>
+ <title>Migrating from Ranch 1.5 to 1.6</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/</guid>
+ <description>Ranch 1.6 added the ability to suspend and resume listeners. It also deprecates a number of features and add interfaces that will be used in Ranch 2.0.
+Ranch 1.6 is compatible with Erlang/OTP 18.0 onward. Support for older releases has been removed.
+Features added Listeners can now be suspended/resumed without stopping existing connection processes. This effectively closes the listening socket and stops the acceptor processes. Transport options can now be updated for suspended listeners.</description>
+ </item>
+
+ <item>
<title>Loop handlers</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1195,6 +1302,16 @@ In this chapter I will use the term Rebar project to refer to a project built us
</item>
<item>
+ <title>Migrating from Ranch 1.x</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.x/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.x/</guid>
+ <description>The changelog for Ranch releases before 1.6 can be found in this section.
+1.5.0 Add transport functions getopts/2, getstat/1 and getstat/2 Fix ranch:info/0 and ranch:procs/2 in embedded mode Prevent ranch_conns_sup from stopping on unexpected messages 1.4.0 Add new transport option num_acceptor Deprecate ranch:start_listener/6 in favor of start_listener/5 Deprecate ranch:child_spec/6 in favor of child_spec/5 1.3.0 The version numbers 1.3.1 and 1.3.2 were later made to fix small mistakes made during the 1.</description>
+ </item>
+
+ <item>
<title>AsciiDoc documentation</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -2538,6 +2655,20 @@ Description This chapter aims to list all HTTP status codes that Cowboy may retu
</item>
<item>
+ <title>Ranch Function Reference</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/</guid>
+ <description>Name ranch - Socket acceptor pool for TCP protocols
+Description Ranch is a socket acceptor pool for TCP protocols.
+Ranch manages listeners which are a set of processes that accept and manage connections. The connection&amp;apos;s transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.
+Modules Functions:
+ranch(3) - Socket acceptor pool Transports:
+ranch_ssl(3) - SSL transport ranch_tcp(3) - TLS transport Behaviors:</description>
+ </item>
+
+ <item>
<title>Ranch User Guide</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/guide/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -2574,6 +2705,15 @@ Description This chapter aims to list all HTTP status codes that Cowboy may retu
</item>
<item>
+ <title>Ranch User Guide</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/</guid>
+ <description>Interface Introduction Listeners Transports Protocols Embedded mode How to Writing parsers SSL client authentication Advanced Internals Additional information Upcoming changes in Ranch 2.0 Migrating from Ranch 1.5 to 1.6 Migrating from Ranch 1.x </description>
+ </item>
+
+ <item>
<title>cowboy(3)</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7093,6 +7233,20 @@ opt() opt() = {ack_timeout, timeout()} | {connection_type, worker | supervisor}
</item>
<item>
+ <title>ranch(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch/</guid>
+ <description>Name ranch - Socket acceptor pool
+Description The module ranch provides functions for starting and manipulating Ranch listeners.
+Exports Start/stop:
+ranch:start_listener(3) - Start a listener ranch:stop_listener(3) - Stop a listener ranch:child_spec(3) - Build child specifications for a new listener Suspend/resume:
+ranch:suspend_listener(3) - Suspend a running listener ranch:resume_listener(3) - Resume a suspended listener ranch:get_status(3) - Get a listener&amp;apos;s running state Connections:
+ranch:accept_ack(3) - Deprecated in favor of ranch:handshake(3) ranch:handshake(3) - Perform the transport handshake ranch:remove_connection(3) - Remove connection from the count Options:</description>
+ </item>
+
+ <item>
<title>ranch(7)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_app/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7146,6 +7300,268 @@ profile (false) When enabled, Ranch will start eprof profiling automatically.
</item>
<item>
+ <title>ranch(7)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_app/</guid>
+ <description>Name ranch - Socket acceptor pool for TCP protocols
+Description Ranch is a socket acceptor pool for TCP protocols.
+Ranch manages listeners which are a set of processes that accept and manage connections. The connection&amp;apos;s transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.
+Modules Functions:
+ranch(3) - Socket acceptor pool Transports:
+ranch_ssl(3) - SSL transport ranch_tcp(3) - TLS transport Behaviors:</description>
+ </item>
+
+ <item>
+ <title>ranch:child_spec(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.child_spec/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.child_spec/</guid>
+ <description>Name ranch:child_spec - Build child specifications for a new listener
+Description child_spec(Ref :: ranch_ref(), Transport :: module(), TransOpts :: ranch:opts(), Protocol :: module(), ProtoOpts :: any()) -&amp;gt; supervisor:child_spec() Build child specifications for a new listener.
+This function can be used to embed a listener directly in an application&amp;apos;s supervision tree.
+Arguments Ref The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the configuration.</description>
+ </item>
+
+ <item>
+ <title>ranch:get_addr(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_addr/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_addr/</guid>
+ <description>Name ranch:get_addr - Get the listening port and IP
+Description get_addr(Ref :: ranch:ref()) -&amp;gt; {IP :: inet:ip_address(), Port :: inet:port_number()} Get the listening port and IP.
+Arguments Ref The listener name.
+ Return value The address of the listener is returned as a tuple.
+The IP address is the IP of the network interface the socket is bound to.
+Examples Get the listening port and IP {IP, Port} = ranch:get_addr(example).</description>
+ </item>
+
+ <item>
+ <title>ranch:get_max_connections(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_max_connections/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_max_connections/</guid>
+ <description>Name ranch:get_max_connections - Get the max number of connections
+Description get_max_connections(Ref :: ranch:ref()) -&amp;gt; MaxConns :: ranch:max_conns() Get the max number of connections.
+Arguments Ref The listener name.
+ Return value The maximum number of connections is returned.
+Examples Get the max number of connections MaxConns = ranch:get_max_connections(example). See also ranch:get_protocol_options(3), ranch:get_transport_options(3), ranch:set_max_connections(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_port(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_port/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_port/</guid>
+ <description>Name ranch:get_port - Get the listening port
+Description get_port(Ref :: ranch:ref()) -&amp;gt; Port :: inet:port_number() Get the listening port.
+This function is particularly useful to retrieve the listening port number when it was not provided in the options and was chosen randomly instead.
+Arguments Ref The listener name.
+ Return value The listening port is returned.
+Examples Get the listening port Port = ranch:get_port(example). See also ranch:start_listener(3), ranch:get_addr(3), ranch:info(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_protocol_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_protocol_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_protocol_options/</guid>
+ <description>Name ranch:get_protocol_options - Get the current protocol options
+Description get_protocol_options(Ref :: ranch:ref()) -&amp;gt; ProtoOpts :: any() Get the current protocol options.
+Arguments Ref The listener name.
+ Return value The current protocol options are returned.
+Examples Get the current protocol options ProtoOpts = ranch:get_protocol_options(example). See also ranch:get_max_connections(3), ranch:get_transport_options(3), ranch:set_protocol_options(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_status(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_status/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_status/</guid>
+ <description>Name ranch:get_status - Get a listener&amp;apos;s running state
+Description get_status(Ref :: ranch_ref()) -&amp;gt; running | suspended Get a listener&amp;apos;s running state.
+Arguments Ref The listener name.
+ Return value An atom is returned indicating the running status of the listener.
+Changelog 1.6: Function introduced. Examples Get a listener&amp;apos;s running state ranch:get_status(example). See also ranch:start_listener(3), ranch:stop_listener(3), ranch:suspend_listener(3), ranch:resume_listener(3), ranch:set_transport_options(3), ranch:wait_for_connections(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_transport_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_transport_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_transport_options/</guid>
+ <description>Name ranch:get_transport_options - Get the current transport options
+Description get_transport_options(Ref :: ranch:ref()) -&amp;gt; TransOpts :: any() Get the current transport options.
+Arguments Ref The listener name.
+ Return value The current transport options are returned.
+Examples Get the current transport options TransOpts = ranch:get_transport_options(example). See also ranch:get_max_connections(3), ranch:get_protocol_options(3), ranch:set_transport_options(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:handshake(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.handshake/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.handshake/</guid>
+ <description>Name ranch:handshake - Perform the transport handshake
+Description handshake(Ref) -&amp;gt; handshake(Ref, []) handshake(Ref, Opts) -&amp;gt; {ok, Socket} Ref :: ranch:ref() Opts :: any() Socket :: any() Perform the transport handshake.
+This function must be called by the protocol process in order to retrieve the socket for the connection. Ranch performs the handshake necessary to give control of the socket to this process and also does the transport handshake, for example setting up the TLS connection.</description>
+ </item>
+
+ <item>
+ <title>ranch:info(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.info/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.info/</guid>
+ <description>Name ranch:info - Overview of Ranch listeners
+Description info() -&amp;gt; [{Ref, Info}] info(Ref) -&amp;gt; Info Info :: [{Key :: atom(), Value :: any()}] Overview of Ranch listeners.
+Arguments Ref The listener name.
+ Return value Returns detailed information about one or all Ranch listeners. The following keys are returned:
+pid Pid of the listener&amp;apos;s top-level supervisor.
+ status Listener status, either running or suspended.
+ ip Interface Ranch listens on.</description>
+ </item>
+
+ <item>
+ <title>ranch:procs(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.procs/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.procs/</guid>
+ <description>Name ranch:procs - Retrieve pids from a listener
+Description procs(Ref :: ranch:ref(), Type :: acceptors | connections) -&amp;gt; Pids :: [pid()] Retrieve pids from a listener.
+Arguments Ref The listener name.
+ Type The type of process that will be returned.
+ Return value A list of pids is returned.
+Examples Get the pids of the acceptor processes Pids = ranch:procs(acceptors). Get the pids of the connection processes Pids = ranch:procs(connections).</description>
+ </item>
+
+ <item>
+ <title>ranch:remove_connection(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.remove_connection/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.remove_connection/</guid>
+ <description>Name ranch:remove_connection - Remove connection from the count
+Description remove_connection(Ref :: ranch:ref()) -&amp;gt; ok Remove connection from the count.
+This connection will no longer be included in the count when limiting the number of connections. This can be useful in a mixed environment where some connections are active and others are passive. Passive connections spend most of their time idling and are not consuming much resources.
+This function may only be called from a connection process.</description>
+ </item>
+
+ <item>
+ <title>ranch:resume_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.resume_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.resume_listener/</guid>
+ <description>Name ranch:resume_listener - Resume a suspended listener
+Description resume_listener(Ref :: ranch_ref()) -&amp;gt; ok | {error, any()} Resume a suspended listener.
+Ranch will start listening for and accepting connections again. The function ranch:set_transport_options(3) can be used to change the transport options before resuming the listener.
+Nothing is done when the listener is already running.
+Arguments Ref The listener name.
+ Return value The atom ok is returned on success.</description>
+ </item>
+
+ <item>
+ <title>ranch:set_max_connections(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_max_connections/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_max_connections/</guid>
+ <description>Name ranch:set_max_connections - Set the max number of connections
+Description set_max_connections(Ref :: ranch:ref(), MaxConns :: ranch:max_conns()) -&amp;gt; ok Set the max number of connections.
+The change will be applied immediately. If the new value is smaller than the previous one, Ranch will wait for the extra connections to terminate and will not accept new connections until the number of connections goes below the limit.
+Arguments Ref The listener name.</description>
+ </item>
+
+ <item>
+ <title>ranch:set_protocol_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_protocol_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_protocol_options/</guid>
+ <description>Name ranch:set_protocol_options - Set the protocol options
+Description set_protocol_options(Ref :: ranch:ref(), ProtoOpts :: any()) -&amp;gt; ok Set the protocol options.
+The change will be applied immediately for all new connections. Old connections will not receive the new options.
+Arguments Ref The listener name.
+ ProtoOpts The new protocol options.
+ Return value The atom ok is always returned. It can be safely ignored.
+Examples Set the protocol options ranch:set_protocol_options(example, ProtoOpts).</description>
+ </item>
+
+ <item>
+ <title>ranch:set_transport_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_transport_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_transport_options/</guid>
+ <description>Name ranch:set_transport_options - Set the transport options
+Description set_transport_options(Ref :: ranch:ref(), TransOpts :: any()) -&amp;gt; ok | {error, running} Set the transport options.
+The listener must be suspended for this call to succeed. If the listener is running, {error, running} will be returned.
+The change will take effect when the listener resumes.
+Arguments Ref The listener name.
+ TransOpts The new transport options.
+ Return value The atom ok is always returned.</description>
+ </item>
+
+ <item>
+ <title>ranch:start_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.start_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.start_listener/</guid>
+ <description>Name ranch:start_listener - Start a listener
+Description start_listener(Ref :: ranch_ref(), Transport :: module(), TransOpts :: ranch:opts(), Protocol :: module(), ProtoOpts :: any()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start a listener.
+A listener is a set of processes that accepts and manages connections using the given transport and protocol modules.
+Arguments Ref The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the configuration.</description>
+ </item>
+
+ <item>
+ <title>ranch:stop_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.stop_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.stop_listener/</guid>
+ <description>Name ranch:stop_listener - Stop a listener
+Description stop_listener(Ref :: ranch_ref()) -&amp;gt; ok | {error, not_found} Stop a listener.
+The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the shutdown transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.
+In order for the connection processes to exit gracefully, they need to trap exit signals and stop before the configured shutdown timeout.</description>
+ </item>
+
+ <item>
+ <title>ranch:suspend_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.suspend_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.suspend_listener/</guid>
+ <description>Name ranch:suspend_listener - Suspend a running listener
+Description suspend_listener(Ref :: ranch_ref()) -&amp;gt; ok | {error, any()} Suspend a running listener.
+Ranch will stop listening for and accepting connections and the listening socket will be closed. Existing connections will continue undisturbed. The function ranch:wait_for_connections(3) can be used to wait for connections to be closed if necessary.
+Some transport options can only be changed when the listener is suspended. Please consult the ranch:set_transport_options(3) manual for more information.</description>
+ </item>
+
+ <item>
+ <title>ranch:wait_for_connections(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.wait_for_connections/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.wait_for_connections/</guid>
+ <description>Name ranch:wait_for_connections - Wait for a specific number of connections
+Description wait_for_connections(Ref :: ranch:ref(), Operator, NumConns :: non_neg_integer()) -&amp;gt; ok Operator :: &#39;&amp;gt;&#39; | &#39;&amp;gt;=&#39; | &#39;==&#39; | &#39;=&amp;lt;&#39; | &#39;&amp;lt;&#39; Wait for a specific number of connections.
+This function waits until the number of connections on the given listener becomes higher than, equal to or lower than the given number. It never returns otherwise.
+This function can be used to gracefully shutdown a listener by first suspending the listener and then waiting for connections to terminate before finally stopping the listener.</description>
+ </item>
+
+ <item>
<title>ranch_protocol(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_protocol/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7210,6 +7626,19 @@ Callbacks start_link(Ref, Socket, Transport, ProtoOpts) -&amp;gt; {ok, pid()} |
</item>
<item>
+ <title>ranch_protocol(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_protocol/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_protocol/</guid>
+ <description>Name ranch_protocol - Protocol modules
+Description The module ranch_protocol defines the interface used by Ranch protocols.
+Callbacks Ranch protocols implement the following interface:
+start_link(Ref :: ranch:ref(), _, Transport :: module(), ProtoOpts :: any()) -&amp;gt; {ok, ConnPid :: pid()} | {ok, SupPid :: pid(), ConnPid :: pid()} Start a new connection process.
+The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid.</description>
+ </item>
+
+ <item>
<title>ranch_ssl(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_ssl/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7254,6 +7683,21 @@ Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_miti
</item>
<item>
+ <title>ranch_ssl(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_ssl/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_ssl/</guid>
+ <description>Name ranch_ssl - SSL transport
+Description The module ranch_ssl implements an SSL Ranch transport.
+Exports The module ranch_ssl implements the interface defined by ranch_transport(3).
+Types opt() opt() :: ranch_tcp:opt() | ssl_opt() Listen options.
+The TCP options are defined in ranch_tcp(3).
+opts() opts() :: [opt()] List of listen options.
+ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0.</description>
+ </item>
+
+ <item>
<title>ranch_tcp(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_tcp/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7302,6 +7746,19 @@ Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} |
</item>
<item>
+ <title>ranch_tcp(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_tcp/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_tcp/</guid>
+ <description>Name ranch_tcp - TCP transport
+Description The module ranch_tcp implements a TCP Ranch transport.
+The function sendfile may not work correctly when used against files stored in a VirtualBox shared folder.
+Exports The module ranch_tcp implements the interface defined by ranch_transport(3).
+Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
+ </item>
+
+ <item>
<title>ranch_transport(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_transport/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7361,5 +7818,30 @@ Callbacks accept(LSocket, Timeout) -&amp;gt; {ok, CSocket} | {error, closed | ti
Accept a connection on the given listening socket.</description>
</item>
+ <item>
+ <title>ranch_transport(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport/</guid>
+ <description>Name ranch_transport - Transport modules
+Description The module ranch_transport defines the interface used by Ranch transports.
+Callbacks Ranch transports implement the following interface:
+accept accept(LSocket :: socket(), Timeout :: timeout()) -&amp;gt; {ok, Socket :: socket()} | {error, closed | timeout | atom()} Use the listening socket returned by listen/1 to accept a new connection. The timeout is specified in milliseconds.
+close close(Socket :: socket()) -&amp;gt; ok Close the socket.</description>
+ </item>
+
+ <item>
+ <title>ranch_transport:sendfile(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport.sendfile/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport.sendfile/</guid>
+ <description>Name ranch_transport:sendfile - Send a file on the socket
+Description sendfile(Transport :: module(), Socket :: ranch_transport:socket(), File :: file:name_all() | file:fd(), Offset :: non_neg_integer(), Bytes :: non_neg_integer(), Opts :: ranch_transport:sendfile_opts()) -&amp;gt; {ok, SentBytes :: non_neg_integer()} | {error, atom()} Send a file on the socket.
+The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.
+This function emulates the function file:sendfile/2,4,5 and may be used when transports are not manipulating TCP directly.</description>
+ </item>
+
</channel>
</rss> \ No newline at end of file
diff --git a/donate/index.html b/donate/index.html
index 4220ea53..90524c67 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -535,6 +535,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
@@ -1401,6 +1425,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/index.html b/index.html
index 78511f7a..13176599 100644
--- a/index.html
+++ b/index.html
@@ -219,10 +219,10 @@
<a class="btn btn-large" href="https://github.com/ninenines/ranch">Source Code</a>
- <a class="btn btn-large" href="/docs/en/ranch/1.5/guide/">User Guide</a>
+ <a class="btn btn-large" href="/docs/en/ranch/1.6/guide/">User Guide</a>
- <a class="btn btn-large" href="/docs/en/ranch/1.5/manual/">Manual</a>
+ <a class="btn btn-large" href="/docs/en/ranch/1.6/manual/">Manual</a>
</p>
@@ -698,6 +698,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<p>Feeling generous? Love reading?<br/><a href="https://salt.bountysource.com/teams/ninenines">Crowdfund my salary</a> or buy <a href="/articles/erlanger-playbook">The Erlanger Playbook</a></p>
@@ -1549,6 +1573,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div></div>
</div>
diff --git a/index.xml b/index.xml
index 77a72f0a..312f79b0 100644
--- a/index.xml
+++ b/index.xml
@@ -6,7 +6,7 @@
<description>Recent content on Nine Nines</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
- <lastBuildDate>Fri, 27 Jul 2018 10:00:00 +0100</lastBuildDate>
+ <lastBuildDate>Wed, 01 Aug 2018 10:00:00 +0100</lastBuildDate>
<atom:link href="https://ninenines.eu/index.xml" rel="self" type="application/rss+xml" />
@@ -87,6 +87,18 @@ Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Win
</item>
<item>
+ <title>Introduction</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/introduction/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/introduction/</guid>
+ <description>Ranch is a socket acceptor pool for TCP protocols.
+Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
+Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
+Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
+ </item>
+
+ <item>
<title>The modern Web</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/modern_web/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -243,6 +255,16 @@ The listener takes care of supervising all the acceptor and connection processes
</item>
<item>
+ <title>Listeners</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/</guid>
+ <description>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 use of transport handlers.
+The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
+ </item>
+
+ <item>
<title>Starting and stopping</title>
<link>https://ninenines.eu/docs/en/gun/1.0/guide/start/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -379,6 +401,19 @@ Ranch depends on ssl by default so any necessary dependencies will start when Ra
</item>
<item>
+ <title>Transports</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/transports/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/transports/</guid>
+ <description>A transport defines the interface to interact with a socket.
+Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
+TCP transport The TCP transport is a thin wrapper around gen_tcp.
+SSL transport The SSL transport is a thin wrapper around ssl.
+Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
+ </item>
+
+ <item>
<title>Overview</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/overview/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -441,6 +476,16 @@ Writing a protocol handler All protocol handlers must implement the ranch_protoc
</item>
<item>
+ <title>Protocols</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/</guid>
+ <description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
+ </item>
+
+ <item>
<title>Getting started</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -554,6 +599,16 @@ Embedding To embed Ranch in your application you can simply add the child specs
</item>
<item>
+ <title>Embedded mode</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/</guid>
+ <description>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.
+Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
+ </item>
+
+ <item>
<title>Limitations</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -682,6 +737,17 @@ This chapter isn&amp;apos;t specifically about Ranch, we assume here that you kn
</item>
<item>
+ <title>Writing parsers</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/</guid>
+ <description>There are three kinds of protocols:
+Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
+This chapter isn&amp;apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;apos;t been parsed is saved in a buffer.</description>
+ </item>
+
+ <item>
<title>Building</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/app/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -789,6 +855,16 @@ The server only needs to retain the certificate serial number and the certificat
</item>
<item>
+ <title>SSL client authentication</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/</guid>
+ <description>Purpose SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.
+The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
+ </item>
+
+ <item>
<title>Packages and dependencies</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/deps/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -911,6 +987,16 @@ Note that for everything related to efficiency and performance, you should perfo
</item>
<item>
+ <title>Internals</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/internals/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/internals/</guid>
+ <description>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.
+Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
+ </item>
+
+ <item>
<title>Constraints</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -982,6 +1068,16 @@ RELX_CONFIG = $(CURDIR)/webchat.config Relx does not need to be installed. Erla
</item>
<item>
+ <title>Upcoming changes in Ranch 2.0</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/</guid>
+ <description>The following changes will be done in Ranch 2.0. In most cases an alternative is already available in the most recent Ranch version.
+The function ranch:start_listener/6 has been deprecated in favor of ranch:start_listener/5. The number of acceptors was removed and will be taken from the transport options. The function ranch:child_spec/6 has also been deprecated, in favor of ranch:child_spec/5. The function ranch:accept_ack/1 has been deprecated in favor of ranch:handshake/1,2. The function ranch:info/1,2 will return a map containing each listener&amp;apos;s information rather than a list of key/values.</description>
+ </item>
+
+ <item>
<title>Self-extracting releases</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1071,6 +1167,17 @@ Requirements Erlang.mk uses p7zip by default to generate the escript archive. Ma
</item>
<item>
+ <title>Migrating from Ranch 1.5 to 1.6</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/</guid>
+ <description>Ranch 1.6 added the ability to suspend and resume listeners. It also deprecates a number of features and add interfaces that will be used in Ranch 2.0.
+Ranch 1.6 is compatible with Erlang/OTP 18.0 onward. Support for older releases has been removed.
+Features added Listeners can now be suspended/resumed without stopping existing connection processes. This effectively closes the listening socket and stops the acceptor processes. Transport options can now be updated for suspended listeners.</description>
+ </item>
+
+ <item>
<title>Loop handlers</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -1196,6 +1303,16 @@ In this chapter I will use the term Rebar project to refer to a project built us
</item>
<item>
+ <title>Migrating from Ranch 1.x</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.x/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.x/</guid>
+ <description>The changelog for Ranch releases before 1.6 can be found in this section.
+1.5.0 Add transport functions getopts/2, getstat/1 and getstat/2 Fix ranch:info/0 and ranch:procs/2 in embedded mode Prevent ranch_conns_sup from stopping on unexpected messages 1.4.0 Add new transport option num_acceptor Deprecate ranch:start_listener/6 in favor of start_listener/5 Deprecate ranch:child_spec/6 in favor of child_spec/5 1.3.0 The version numbers 1.3.1 and 1.3.2 were later made to fix small mistakes made during the 1.</description>
+ </item>
+
+ <item>
<title>AsciiDoc documentation</title>
<link>https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -2308,6 +2425,17 @@ HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message He
</item>
<item>
+ <title>Ranch 1.6</title>
+ <link>https://ninenines.eu/articles/ranch-1.6.0/</link>
+ <pubDate>Wed, 01 Aug 2018 10:00:00 +0100</pubDate>
+
+ <guid>https://ninenines.eu/articles/ranch-1.6.0/</guid>
+ <description>Ranch 1.6.0 has been released!
+This release sees the introduction of a suspend/resume mechanism for the listeners which makes the listener close the listening socket and stop accepting new connections. Existing connections continue uninterrupted.
+This can be used to update the socket options of the listener, or to implement a graceful shutdown. To that end a function has also been added which allows waiting until connections reach a certain number.</description>
+ </item>
+
+ <item>
<title>Gun 1.0</title>
<link>https://ninenines.eu/articles/gun-1.0.0/</link>
<pubDate>Fri, 27 Jul 2018 10:00:00 +0100</pubDate>
@@ -2960,6 +3088,20 @@ Description This chapter aims to list all HTTP status codes that Cowboy may retu
</item>
<item>
+ <title>Ranch Function Reference</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/</guid>
+ <description>Name ranch - Socket acceptor pool for TCP protocols
+Description Ranch is a socket acceptor pool for TCP protocols.
+Ranch manages listeners which are a set of processes that accept and manage connections. The connection&amp;apos;s transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.
+Modules Functions:
+ranch(3) - Socket acceptor pool Transports:
+ranch_ssl(3) - SSL transport ranch_tcp(3) - TLS transport Behaviors:</description>
+ </item>
+
+ <item>
<title>Ranch User Guide</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/guide/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -2996,6 +3138,15 @@ Description This chapter aims to list all HTTP status codes that Cowboy may retu
</item>
<item>
+ <title>Ranch User Guide</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/guide/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/guide/</guid>
+ <description>Interface Introduction Listeners Transports Protocols Embedded mode How to Writing parsers SSL client authentication Advanced Internals Additional information Upcoming changes in Ranch 2.0 Migrating from Ranch 1.5 to 1.6 Migrating from Ranch 1.x </description>
+ </item>
+
+ <item>
<title>cowboy(3)</title>
<link>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7515,6 +7666,20 @@ opt() opt() = {ack_timeout, timeout()} | {connection_type, worker | supervisor}
</item>
<item>
+ <title>ranch(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch/</guid>
+ <description>Name ranch - Socket acceptor pool
+Description The module ranch provides functions for starting and manipulating Ranch listeners.
+Exports Start/stop:
+ranch:start_listener(3) - Start a listener ranch:stop_listener(3) - Stop a listener ranch:child_spec(3) - Build child specifications for a new listener Suspend/resume:
+ranch:suspend_listener(3) - Suspend a running listener ranch:resume_listener(3) - Resume a suspended listener ranch:get_status(3) - Get a listener&amp;apos;s running state Connections:
+ranch:accept_ack(3) - Deprecated in favor of ranch:handshake(3) ranch:handshake(3) - Perform the transport handshake ranch:remove_connection(3) - Remove connection from the count Options:</description>
+ </item>
+
+ <item>
<title>ranch(7)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_app/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7568,6 +7733,268 @@ profile (false) When enabled, Ranch will start eprof profiling automatically.
</item>
<item>
+ <title>ranch(7)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_app/</guid>
+ <description>Name ranch - Socket acceptor pool for TCP protocols
+Description Ranch is a socket acceptor pool for TCP protocols.
+Ranch manages listeners which are a set of processes that accept and manage connections. The connection&amp;apos;s transport and protocol modules are configured per listener. Listeners can be inspected and reconfigured without interruptions in service.
+Modules Functions:
+ranch(3) - Socket acceptor pool Transports:
+ranch_ssl(3) - SSL transport ranch_tcp(3) - TLS transport Behaviors:</description>
+ </item>
+
+ <item>
+ <title>ranch:child_spec(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.child_spec/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.child_spec/</guid>
+ <description>Name ranch:child_spec - Build child specifications for a new listener
+Description child_spec(Ref :: ranch_ref(), Transport :: module(), TransOpts :: ranch:opts(), Protocol :: module(), ProtoOpts :: any()) -&amp;gt; supervisor:child_spec() Build child specifications for a new listener.
+This function can be used to embed a listener directly in an application&amp;apos;s supervision tree.
+Arguments Ref The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the configuration.</description>
+ </item>
+
+ <item>
+ <title>ranch:get_addr(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_addr/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_addr/</guid>
+ <description>Name ranch:get_addr - Get the listening port and IP
+Description get_addr(Ref :: ranch:ref()) -&amp;gt; {IP :: inet:ip_address(), Port :: inet:port_number()} Get the listening port and IP.
+Arguments Ref The listener name.
+ Return value The address of the listener is returned as a tuple.
+The IP address is the IP of the network interface the socket is bound to.
+Examples Get the listening port and IP {IP, Port} = ranch:get_addr(example).</description>
+ </item>
+
+ <item>
+ <title>ranch:get_max_connections(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_max_connections/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_max_connections/</guid>
+ <description>Name ranch:get_max_connections - Get the max number of connections
+Description get_max_connections(Ref :: ranch:ref()) -&amp;gt; MaxConns :: ranch:max_conns() Get the max number of connections.
+Arguments Ref The listener name.
+ Return value The maximum number of connections is returned.
+Examples Get the max number of connections MaxConns = ranch:get_max_connections(example). See also ranch:get_protocol_options(3), ranch:get_transport_options(3), ranch:set_max_connections(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_port(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_port/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_port/</guid>
+ <description>Name ranch:get_port - Get the listening port
+Description get_port(Ref :: ranch:ref()) -&amp;gt; Port :: inet:port_number() Get the listening port.
+This function is particularly useful to retrieve the listening port number when it was not provided in the options and was chosen randomly instead.
+Arguments Ref The listener name.
+ Return value The listening port is returned.
+Examples Get the listening port Port = ranch:get_port(example). See also ranch:start_listener(3), ranch:get_addr(3), ranch:info(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_protocol_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_protocol_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_protocol_options/</guid>
+ <description>Name ranch:get_protocol_options - Get the current protocol options
+Description get_protocol_options(Ref :: ranch:ref()) -&amp;gt; ProtoOpts :: any() Get the current protocol options.
+Arguments Ref The listener name.
+ Return value The current protocol options are returned.
+Examples Get the current protocol options ProtoOpts = ranch:get_protocol_options(example). See also ranch:get_max_connections(3), ranch:get_transport_options(3), ranch:set_protocol_options(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_status(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_status/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_status/</guid>
+ <description>Name ranch:get_status - Get a listener&amp;apos;s running state
+Description get_status(Ref :: ranch_ref()) -&amp;gt; running | suspended Get a listener&amp;apos;s running state.
+Arguments Ref The listener name.
+ Return value An atom is returned indicating the running status of the listener.
+Changelog 1.6: Function introduced. Examples Get a listener&amp;apos;s running state ranch:get_status(example). See also ranch:start_listener(3), ranch:stop_listener(3), ranch:suspend_listener(3), ranch:resume_listener(3), ranch:set_transport_options(3), ranch:wait_for_connections(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:get_transport_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_transport_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_transport_options/</guid>
+ <description>Name ranch:get_transport_options - Get the current transport options
+Description get_transport_options(Ref :: ranch:ref()) -&amp;gt; TransOpts :: any() Get the current transport options.
+Arguments Ref The listener name.
+ Return value The current transport options are returned.
+Examples Get the current transport options TransOpts = ranch:get_transport_options(example). See also ranch:get_max_connections(3), ranch:get_protocol_options(3), ranch:set_transport_options(3), ranch(3)</description>
+ </item>
+
+ <item>
+ <title>ranch:handshake(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.handshake/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.handshake/</guid>
+ <description>Name ranch:handshake - Perform the transport handshake
+Description handshake(Ref) -&amp;gt; handshake(Ref, []) handshake(Ref, Opts) -&amp;gt; {ok, Socket} Ref :: ranch:ref() Opts :: any() Socket :: any() Perform the transport handshake.
+This function must be called by the protocol process in order to retrieve the socket for the connection. Ranch performs the handshake necessary to give control of the socket to this process and also does the transport handshake, for example setting up the TLS connection.</description>
+ </item>
+
+ <item>
+ <title>ranch:info(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.info/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.info/</guid>
+ <description>Name ranch:info - Overview of Ranch listeners
+Description info() -&amp;gt; [{Ref, Info}] info(Ref) -&amp;gt; Info Info :: [{Key :: atom(), Value :: any()}] Overview of Ranch listeners.
+Arguments Ref The listener name.
+ Return value Returns detailed information about one or all Ranch listeners. The following keys are returned:
+pid Pid of the listener&amp;apos;s top-level supervisor.
+ status Listener status, either running or suspended.
+ ip Interface Ranch listens on.</description>
+ </item>
+
+ <item>
+ <title>ranch:procs(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.procs/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.procs/</guid>
+ <description>Name ranch:procs - Retrieve pids from a listener
+Description procs(Ref :: ranch:ref(), Type :: acceptors | connections) -&amp;gt; Pids :: [pid()] Retrieve pids from a listener.
+Arguments Ref The listener name.
+ Type The type of process that will be returned.
+ Return value A list of pids is returned.
+Examples Get the pids of the acceptor processes Pids = ranch:procs(acceptors). Get the pids of the connection processes Pids = ranch:procs(connections).</description>
+ </item>
+
+ <item>
+ <title>ranch:remove_connection(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.remove_connection/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.remove_connection/</guid>
+ <description>Name ranch:remove_connection - Remove connection from the count
+Description remove_connection(Ref :: ranch:ref()) -&amp;gt; ok Remove connection from the count.
+This connection will no longer be included in the count when limiting the number of connections. This can be useful in a mixed environment where some connections are active and others are passive. Passive connections spend most of their time idling and are not consuming much resources.
+This function may only be called from a connection process.</description>
+ </item>
+
+ <item>
+ <title>ranch:resume_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.resume_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.resume_listener/</guid>
+ <description>Name ranch:resume_listener - Resume a suspended listener
+Description resume_listener(Ref :: ranch_ref()) -&amp;gt; ok | {error, any()} Resume a suspended listener.
+Ranch will start listening for and accepting connections again. The function ranch:set_transport_options(3) can be used to change the transport options before resuming the listener.
+Nothing is done when the listener is already running.
+Arguments Ref The listener name.
+ Return value The atom ok is returned on success.</description>
+ </item>
+
+ <item>
+ <title>ranch:set_max_connections(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_max_connections/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_max_connections/</guid>
+ <description>Name ranch:set_max_connections - Set the max number of connections
+Description set_max_connections(Ref :: ranch:ref(), MaxConns :: ranch:max_conns()) -&amp;gt; ok Set the max number of connections.
+The change will be applied immediately. If the new value is smaller than the previous one, Ranch will wait for the extra connections to terminate and will not accept new connections until the number of connections goes below the limit.
+Arguments Ref The listener name.</description>
+ </item>
+
+ <item>
+ <title>ranch:set_protocol_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_protocol_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_protocol_options/</guid>
+ <description>Name ranch:set_protocol_options - Set the protocol options
+Description set_protocol_options(Ref :: ranch:ref(), ProtoOpts :: any()) -&amp;gt; ok Set the protocol options.
+The change will be applied immediately for all new connections. Old connections will not receive the new options.
+Arguments Ref The listener name.
+ ProtoOpts The new protocol options.
+ Return value The atom ok is always returned. It can be safely ignored.
+Examples Set the protocol options ranch:set_protocol_options(example, ProtoOpts).</description>
+ </item>
+
+ <item>
+ <title>ranch:set_transport_options(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_transport_options/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_transport_options/</guid>
+ <description>Name ranch:set_transport_options - Set the transport options
+Description set_transport_options(Ref :: ranch:ref(), TransOpts :: any()) -&amp;gt; ok | {error, running} Set the transport options.
+The listener must be suspended for this call to succeed. If the listener is running, {error, running} will be returned.
+The change will take effect when the listener resumes.
+Arguments Ref The listener name.
+ TransOpts The new transport options.
+ Return value The atom ok is always returned.</description>
+ </item>
+
+ <item>
+ <title>ranch:start_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.start_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.start_listener/</guid>
+ <description>Name ranch:start_listener - Start a listener
+Description start_listener(Ref :: ranch_ref(), Transport :: module(), TransOpts :: ranch:opts(), Protocol :: module(), ProtoOpts :: any()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start a listener.
+A listener is a set of processes that accepts and manages connections using the given transport and protocol modules.
+Arguments Ref The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the configuration.</description>
+ </item>
+
+ <item>
+ <title>ranch:stop_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.stop_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.stop_listener/</guid>
+ <description>Name ranch:stop_listener - Stop a listener
+Description stop_listener(Ref :: ranch_ref()) -&amp;gt; ok | {error, not_found} Stop a listener.
+The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the shutdown transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.
+In order for the connection processes to exit gracefully, they need to trap exit signals and stop before the configured shutdown timeout.</description>
+ </item>
+
+ <item>
+ <title>ranch:suspend_listener(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.suspend_listener/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.suspend_listener/</guid>
+ <description>Name ranch:suspend_listener - Suspend a running listener
+Description suspend_listener(Ref :: ranch_ref()) -&amp;gt; ok | {error, any()} Suspend a running listener.
+Ranch will stop listening for and accepting connections and the listening socket will be closed. Existing connections will continue undisturbed. The function ranch:wait_for_connections(3) can be used to wait for connections to be closed if necessary.
+Some transport options can only be changed when the listener is suspended. Please consult the ranch:set_transport_options(3) manual for more information.</description>
+ </item>
+
+ <item>
+ <title>ranch:wait_for_connections(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.wait_for_connections/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.wait_for_connections/</guid>
+ <description>Name ranch:wait_for_connections - Wait for a specific number of connections
+Description wait_for_connections(Ref :: ranch:ref(), Operator, NumConns :: non_neg_integer()) -&amp;gt; ok Operator :: &#39;&amp;gt;&#39; | &#39;&amp;gt;=&#39; | &#39;==&#39; | &#39;=&amp;lt;&#39; | &#39;&amp;lt;&#39; Wait for a specific number of connections.
+This function waits until the number of connections on the given listener becomes higher than, equal to or lower than the given number. It never returns otherwise.
+This function can be used to gracefully shutdown a listener by first suspending the listener and then waiting for connections to terminate before finally stopping the listener.</description>
+ </item>
+
+ <item>
<title>ranch_protocol(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_protocol/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7632,6 +8059,19 @@ Callbacks start_link(Ref, Socket, Transport, ProtoOpts) -&amp;gt; {ok, pid()} |
</item>
<item>
+ <title>ranch_protocol(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_protocol/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_protocol/</guid>
+ <description>Name ranch_protocol - Protocol modules
+Description The module ranch_protocol defines the interface used by Ranch protocols.
+Callbacks Ranch protocols implement the following interface:
+start_link(Ref :: ranch:ref(), _, Transport :: module(), ProtoOpts :: any()) -&amp;gt; {ok, ConnPid :: pid()} | {ok, SupPid :: pid(), ConnPid :: pid()} Start a new connection process.
+The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid.</description>
+ </item>
+
+ <item>
<title>ranch_ssl(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_ssl/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7676,6 +8116,21 @@ Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_miti
</item>
<item>
+ <title>ranch_ssl(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_ssl/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_ssl/</guid>
+ <description>Name ranch_ssl - SSL transport
+Description The module ranch_ssl implements an SSL Ranch transport.
+Exports The module ranch_ssl implements the interface defined by ranch_transport(3).
+Types opt() opt() :: ranch_tcp:opt() | ssl_opt() Listen options.
+The TCP options are defined in ranch_tcp(3).
+opts() opts() :: [opt()] List of listen options.
+ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0.</description>
+ </item>
+
+ <item>
<title>ranch_tcp(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_tcp/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7724,6 +8179,19 @@ Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} |
</item>
<item>
+ <title>ranch_tcp(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_tcp/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_tcp/</guid>
+ <description>Name ranch_tcp - TCP transport
+Description The module ranch_tcp implements a TCP Ranch transport.
+The function sendfile may not work correctly when used against files stored in a VirtualBox shared folder.
+Exports The module ranch_tcp implements the interface defined by ranch_transport(3).
+Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
+ </item>
+
+ <item>
<title>ranch_transport(3)</title>
<link>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_transport/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
@@ -7783,5 +8251,30 @@ Callbacks accept(LSocket, Timeout) -&amp;gt; {ok, CSocket} | {error, closed | ti
Accept a connection on the given listening socket.</description>
</item>
+ <item>
+ <title>ranch_transport(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport/</guid>
+ <description>Name ranch_transport - Transport modules
+Description The module ranch_transport defines the interface used by Ranch transports.
+Callbacks Ranch transports implement the following interface:
+accept accept(LSocket :: socket(), Timeout :: timeout()) -&amp;gt; {ok, Socket :: socket()} | {error, closed | timeout | atom()} Use the listening socket returned by listen/1 to accept a new connection. The timeout is specified in milliseconds.
+close close(Socket :: socket()) -&amp;gt; ok Close the socket.</description>
+ </item>
+
+ <item>
+ <title>ranch_transport:sendfile(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport.sendfile/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport.sendfile/</guid>
+ <description>Name ranch_transport:sendfile - Send a file on the socket
+Description sendfile(Transport :: module(), Socket :: ranch_transport:socket(), File :: file:name_all() | file:fd(), Offset :: non_neg_integer(), Bytes :: non_neg_integer(), Opts :: ranch_transport:sendfile_opts()) -&amp;gt; {ok, SentBytes :: non_neg_integer()} | {error, atom()} Send a file on the socket.
+The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.
+This function emulates the function file:sendfile/2,4,5 and may be used when transports are not manipulating TCP directly.</description>
+ </item>
+
</channel>
</rss> \ No newline at end of file
diff --git a/services/index.html b/services/index.html
index 0d7d2991..7e376938 100644
--- a/services/index.html
+++ b/services/index.html
@@ -562,6 +562,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
@@ -1428,6 +1452,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/sitemap.xml b/sitemap.xml
index b7f44847..67d3b8dc 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -27,6 +27,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/introduction/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/modern_web/</loc>
</url>
@@ -87,6 +91,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/listeners/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/gun/1.0/guide/start/</loc>
</url>
@@ -131,6 +139,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/transports/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/overview/</loc>
</url>
@@ -155,6 +167,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/protocols/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/</loc>
</url>
@@ -199,6 +215,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/embedded/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/</loc>
</url>
@@ -243,6 +263,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/parsers/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/app/</loc>
</url>
@@ -283,6 +307,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/ssl_auth/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/deps/</loc>
</url>
@@ -327,6 +355,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/internals/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/</loc>
</url>
@@ -351,6 +383,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/upcoming_2.0_changes/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/</loc>
</url>
@@ -379,6 +415,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.5/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/</loc>
</url>
@@ -427,6 +467,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/migrating_from_1.x/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</loc>
</url>
@@ -835,6 +879,11 @@
</url>
<url>
+ <loc>https://ninenines.eu/articles/ranch-1.6.0/</loc>
+ <lastmod>2018-08-01T10:00:00+01:00</lastmod>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/articles/gun-1.0.0/</loc>
<lastmod>2018-07-27T10:00:00+01:00</lastmod>
</url>
@@ -1026,7 +1075,7 @@
<url>
<loc>https://ninenines.eu/articles/</loc>
- <lastmod>2018-07-27T10:00:00+01:00</lastmod>
+ <lastmod>2018-08-01T10:00:00+01:00</lastmod>
<priority>0</priority>
</url>
@@ -1114,7 +1163,7 @@
<url>
<loc>https://ninenines.eu/</loc>
- <lastmod>2018-07-27T10:00:00+01:00</lastmod>
+ <lastmod>2018-08-01T10:00:00+01:00</lastmod>
<priority>0</priority>
</url>
@@ -1135,6 +1184,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/1.2/guide/</loc>
</url>
@@ -1151,6 +1204,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/guide/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/tags/</loc>
<priority>0</priority>
</url>
@@ -2580,6 +2637,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_app/</loc>
</url>
@@ -2596,6 +2657,86 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_app/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.child_spec/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_addr/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_max_connections/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_port/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_protocol_options/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_status/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.get_transport_options/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.handshake/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.info/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.procs/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.remove_connection/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.resume_listener/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_max_connections/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_protocol_options/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.set_transport_options/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.start_listener/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.stop_listener/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.suspend_listener/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch.wait_for_connections/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_protocol/</loc>
</url>
@@ -2612,6 +2753,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_protocol/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_ssl/</loc>
</url>
@@ -2628,6 +2773,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_ssl/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_tcp/</loc>
</url>
@@ -2644,6 +2793,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_tcp/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_transport/</loc>
</url>
@@ -2659,4 +2812,12 @@
<loc>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_transport/</loc>
</url>
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/ranch/1.6/manual/ranch_transport.sendfile/</loc>
+ </url>
+
</urlset> \ No newline at end of file