summaryrefslogtreecommitdiffstats
path: root/docs/en/ranch/2.1/manual
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/ranch/2.1/manual')
-rw-r--r--docs/en/ranch/2.1/manual/index.html201
-rw-r--r--docs/en/ranch/2.1/manual/ranch.child_spec/index.html222
-rw-r--r--docs/en/ranch/2.1/manual/ranch.get_addr/index.html197
-rw-r--r--docs/en/ranch/2.1/manual/ranch.get_max_connections/index.html189
-rw-r--r--docs/en/ranch/2.1/manual/ranch.get_port/index.html187
-rw-r--r--docs/en/ranch/2.1/manual/ranch.get_protocol_options/index.html185
-rw-r--r--docs/en/ranch/2.1/manual/ranch.get_status/index.html188
-rw-r--r--docs/en/ranch/2.1/manual/ranch.get_transport_options/index.html185
-rw-r--r--docs/en/ranch/2.1/manual/ranch.handshake/index.html211
-rw-r--r--docs/en/ranch/2.1/manual/ranch.handshake_cancel/index.html198
-rw-r--r--docs/en/ranch/2.1/manual/ranch.handshake_continue/index.html208
-rw-r--r--docs/en/ranch/2.1/manual/ranch.info/index.html248
-rw-r--r--docs/en/ranch/2.1/manual/ranch.procs/index.html196
-rw-r--r--docs/en/ranch/2.1/manual/ranch.recv_proxy_header/index.html206
-rw-r--r--docs/en/ranch/2.1/manual/ranch.remove_connection/index.html186
-rw-r--r--docs/en/ranch/2.1/manual/ranch.resume_listener/index.html192
-rw-r--r--docs/en/ranch/2.1/manual/ranch.set_max_connections/index.html194
-rw-r--r--docs/en/ranch/2.1/manual/ranch.set_protocol_options/index.html200
-rw-r--r--docs/en/ranch/2.1/manual/ranch.set_transport_options/index.html248
-rw-r--r--docs/en/ranch/2.1/manual/ranch.start_listener/index.html246
-rw-r--r--docs/en/ranch/2.1/manual/ranch.stop_listener/index.html189
-rw-r--r--docs/en/ranch/2.1/manual/ranch.suspend_listener/index.html193
-rw-r--r--docs/en/ranch/2.1/manual/ranch.wait_for_connections/index.html213
-rw-r--r--docs/en/ranch/2.1/manual/ranch/index.html338
-rw-r--r--docs/en/ranch/2.1/manual/ranch_app/index.html201
-rw-r--r--docs/en/ranch/2.1/manual/ranch_protocol/index.html186
-rw-r--r--docs/en/ranch/2.1/manual/ranch_proxy_header.header/index.html220
-rw-r--r--docs/en/ranch/2.1/manual/ranch_proxy_header.parse/index.html191
-rw-r--r--docs/en/ranch/2.1/manual/ranch_proxy_header.to_connection_info/index.html190
-rw-r--r--docs/en/ranch/2.1/manual/ranch_proxy_header/index.html276
-rw-r--r--docs/en/ranch/2.1/manual/ranch_ssl/index.html384
-rw-r--r--docs/en/ranch/2.1/manual/ranch_tcp/index.html286
-rw-r--r--docs/en/ranch/2.1/manual/ranch_transport.sendfile/index.html220
-rw-r--r--docs/en/ranch/2.1/manual/ranch_transport/index.html427
34 files changed, 7601 insertions, 0 deletions
diff --git a/docs/en/ranch/2.1/manual/index.html b/docs/en/ranch/2.1/manual/index.html
new file mode 100644
index 00000000..9a90e7ec
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/index.html
@@ -0,0 +1,201 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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>
+<li><a href="ranch_proxy_header">ranch_proxy_header(3)</a> - PROXY protocol
+</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> - TCP 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.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.child_spec/index.html b/docs/en/ranch/2.1/manual/ranch.child_spec/index.html
new file mode 100644
index 00000000..b244d9ca
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.child_spec/index.html
@@ -0,0 +1,222 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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 which can be embedded directly in an application&apos;s supervision tree.</p>
+<p>The actual listener is placed under a supervisor which monitors <code>ranch_server</code> via a proxy process and will restart the listener if <code>ranch_server</code> crashes.</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 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>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>2.0</strong>: The actual listener is placed under a supervisor in order to restart the listener if <code>ranch_server</code> crashes.
+</li>
+<li><strong>2.0</strong>: The <code>TransOpts</code> argument must no longer contain Ranch-specific options if given as a list. Use a map.
+</li>
+<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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.get_addr/index.html b/docs/en/ranch/2.1/manual/ranch.get_addr/index.html
new file mode 100644
index 00000000..12ce9487
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.get_addr/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: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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_addr(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_addr - Get the listening address</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">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>()}
+ | {<font color="#FF6600">local</font>, <font color="#009900">SocketFile</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#000080">undefined</font>, <font color="#000080">undefined</font>}</tt></pre>
+</div></div>
+<p>Get the listening address.</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 of the form <code>{IP, Port}</code> when listening on a network interface, or <code>{local, SocketFile}</code> when listening on a UNIX Domain socket. When the listener is suspended, <code>{undefined, undefined}</code> will be returned.</p>
+<p>The IP address is the IP of the network interface the socket is bound to.</p>
+<p>The socket file is the path of a file on your system 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.9
+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>
+<div class="listingblock"><div class="title">Get the listening UNIX Domain socket file</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">local</font>, <font color="#009900">SocketFile</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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.get_max_connections/index.html b/docs/en/ranch/2.1/manual/ranch.get_max_connections/index.html
new file mode 100644
index 00000000..70966780
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.get_max_connections/index.html
@@ -0,0 +1,189 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:get_max_connections(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:get_max_connections - Get the max number of connections per connection supervisor</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">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 per connection supervisor.</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 per connection supervisor is returned.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: The maximum number of connections is now per connection supervisor.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Get the max number of connections per connection supervisor</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.get_port/index.html b/docs/en/ranch/2.1/manual/ranch.get_port/index.html
new file mode 100644
index 00000000..be771dc5
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.get_port/index.html
@@ -0,0 +1,187 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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>() | <font color="#000080">undefined</font></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>
+<p>When the listener is suspended or using a UNIX Domain socket instead of a network interface, <code>undefined</code> will be 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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.get_protocol_options/index.html b/docs/en/ranch/2.1/manual/ranch.get_protocol_options/index.html
new file mode 100644
index 00000000..f60777b5
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.get_protocol_options/index.html
@@ -0,0 +1,185 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.get_status/index.html b/docs/en/ranch/2.1/manual/ranch.get_status/index.html
new file mode 100644
index 00000000..64d2cf25
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.get_status/index.html
@@ -0,0 +1,188 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.get_transport_options/index.html b/docs/en/ranch/2.1/manual/ranch.get_transport_options/index.html
new file mode 100644
index 00000000..89c97f1e
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.get_transport_options/index.html
@@ -0,0 +1,185 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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">ranch:transport_opts</font></b>(<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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.handshake/index.html b/docs/en/ranch/2.1/manual/ranch.handshake/index.html
new file mode 100644
index 00000000..4672ce45
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.handshake/index.html
@@ -0,0 +1,211 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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> {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>} | {<font color="#FF6600">continue</font>, <font color="#009900">Info</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="#FF6600">continue</font>, <font color="#009900">Info</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>()
+<font color="#009900">Info</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>
+<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 by default.</p>
+<p>Depending on configuration, a <code>continue</code> tuple can otherwise be returned when the handshake operation is paused. It contains data provided by the transport that can be used to inform further decisions before resuming the handshake, for example to provide new transport options. The handshake can be resumed using <a href="../ranch.handshake_continue">ranch:handshake_continue(3)</a> or canceled using <a href="../ranch.handshake_cancel">ranch:handshake_cancel(3)</a>.</p>
+<p>This function will trigger an exception when an error occurs.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: The <code>continue</code> tuple can now be returned.
+</li>
+<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.9
+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="#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.handshake_continue">ranch:handshake_continue(3)</a>, <a href="../ranch.handshake_cancel">ranch:handshake_cancel(3)</a>, <a href="../ranch.recv_proxy_header">ranch:recv_proxy_header(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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.handshake_cancel/index.html b/docs/en/ranch/2.1/manual/ranch.handshake_cancel/index.html
new file mode 100644
index 00000000..d759ac8a
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.handshake_cancel/index.html
@@ -0,0 +1,198 @@
+<!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_cancel(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:handshake_cancel(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:handshake_cancel - Cancel the paused transport handshake</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">handshake_cancel</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>Cancel the paused transport handshake.</p>
+<p>This function may be called by the protocol process to cancel a paused handshake.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+<p>Allowed options depend on the transport module.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The return value depends on the transport module.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Cancel a paused transport handshake</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</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">continue</font>, <font color="#009900">_Info</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">ranch:handshake_cancel</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000080">exit</font></b>(<font color="#FF6600">handshake_cancelled</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch.handshake">ranch:handshake(3)</a>, <a href="../ranch.handshake_continue">ranch:handshake_continue(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.handshake_continue/index.html b/docs/en/ranch/2.1/manual/ranch.handshake_continue/index.html
new file mode 100644
index 00000000..58974738
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.handshake_continue/index.html
@@ -0,0 +1,208 @@
+<!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_continue(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:handshake_continue(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:handshake_continue - Resume the paused transport handshake</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">handshake_continue</font></b>(<font color="#009900">Ref</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>}
+<b><font color="#000000">handshake_continue</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>Resume the paused transport handshake.</p>
+<p>This function must be called by the protocol process in order to resume a paused handshake.</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>2.0</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Continue a paused transport handshake</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</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">continue</font>, <font color="#009900">_Info</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake</font></b>(<font color="#009900">Ref</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Socket</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:handshake_continue</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.handshake">ranch:handshake(3)</a>, <a href="../ranch.handshake_cancel">ranch:handshake_cancel(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.info/index.html b/docs/en/ranch/2.1/manual/ranch.info/index.html
new file mode 100644
index 00000000..96f5b77a
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.info/index.html
@@ -0,0 +1,248 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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="#990000">:=</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="#990000">:=</font> <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>max_connections</dt>
+<dd><p>Maximum number of connections per connection supervisor.</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>
+<dt>metrics</dt>
+<dd><p>Listener metrics.</p>
+</dd>
+</dl>
+<h2 id="_metrics">Metrics</h2>
+<p>Listener metrics are provided as a map, with the following keys:</p>
+<dl><dt>{conns_sup, Index, accept}</dt>
+<dd><p>Number of accepted connections, per connection supervisor.</p>
+</dd>
+<dt>{conns_sup, Index, terminate}</dt>
+<dd><p>Number of terminated connection processes, per connection supervisor.</p>
+</dd>
+</dl>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.1</strong>: Added accept/terminate metrics to the output of <code>ranch:info/0,1</code>.
+</li>
+<li><strong>2.0</strong>: The listener info is now returned as a map.
+</li>
+<li><strong>2.0</strong>: The <code>num_acceptors</code> key has been removed.
+</li>
+</ul>
+<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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.procs/index.html b/docs/en/ranch/2.1/manual/ranch.procs/index.html
new file mode 100644
index 00000000..3e2a35f2
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.procs/index.html
@@ -0,0 +1,196 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.recv_proxy_header/index.html b/docs/en/ranch/2.1/manual/ranch.recv_proxy_header/index.html
new file mode 100644
index 00000000..ff86375e
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.recv_proxy_header/index.html
@@ -0,0 +1,206 @@
+<!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:recv_proxy_header(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:recv_proxy_header(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:recv_proxy_header - Receive the PROXY protocol header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">recv_proxy_header</font></b>(<b><font color="#000000">ranch:ref</font></b>(), <b><font color="#000000">timeout</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <b><font color="#000000">ranch_proxy_header:proxy_info</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">protocol_error</font>, <font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Receive the PROXY protocol header.</p>
+<p>This function must be called before <code>ranch:handshake/1,2</code> on newly accepted connections to read and parse the PROXY protocol header, if any.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Ref</dt>
+<dd><p>The listener name.</p>
+</dd>
+<dt>Timeout</dt>
+<dd><p>Receive timeout in milliseconds.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An <code>ok</code> tuple is returned containing PROXY header information on success.</p>
+<p>An <code>error</code> 2-tuple is returned when a socket error occurs.</p>
+<p>An <code>error</code> 3-tuple is returned when a protocol error occurs and Ranch was not able to parse the PROXY header information. The third element contains a human-readable description of the error.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.7</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Receive the PROXY protocol header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</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">ProxyInfo</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:recv_proxy_header</font></b>(<font color="#009900">Ref</font>, <font color="#993399">1000</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">proxy_info</font><font color="#990000">=</font><font color="#009900">ProxyInfo</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.handshake">ranch:handshake(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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.remove_connection/index.html b/docs/en/ranch/2.1/manual/ranch.remove_connection/index.html
new file mode 100644
index 00000000..b8ba83c0
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.remove_connection/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: 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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.resume_listener/index.html b/docs/en/ranch/2.1/manual/ranch.resume_listener/index.html
new file mode 100644
index 00000000..e94a7874
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.resume_listener/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: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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.set_max_connections/index.html b/docs/en/ranch/2.1/manual/ranch.set_max_connections/index.html
new file mode 100644
index 00000000..4905c8b7
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.set_max_connections/index.html
@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: 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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch:set_max_connections(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch:set_max_connections - Set the max number of connections per connection supervisor</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">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 per connection supervisor.</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 per connection supervisor.</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>2.0</strong>: The maximum number of connections is now per connection supervisor.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Set the max number of connections per connection supervisor</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.set_protocol_options/index.html b/docs/en/ranch/2.1/manual/ranch.set_protocol_options/index.html
new file mode 100644
index 00000000..1391a86b
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.set_protocol_options/index.html
@@ -0,0 +1,200 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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>
+<p>Note that the complete set of protocol options is replaced. To update a subset of the options, it is recommended to get the current protocol options using <a href="../ranch.get_protocol_options">ranch:get_protocol_options(3)</a>, update them and then set them back using this function.</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.9
+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>
+<div class="listingblock"><div class="title">Update some of the protocol options</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">ProtoOpts0</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">example</font>),
+<font color="#009900">ProtoOpts</font> <font color="#990000">=</font> <font color="#009900">ProtoOpts0</font>#{<font color="#0000FF">request_timeout</font> <font color="#990000">=&gt;</font> <font color="#993399">2000</font>},
+<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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.set_transport_options/index.html b/docs/en/ranch/2.1/manual/ranch.set_transport_options/index.html
new file mode 100644
index 00000000..e614dc57
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.set_transport_options/index.html
@@ -0,0 +1,248 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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">ranch:opts</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">term</font></b>()}</tt></pre>
+</div></div>
+<p>Set the transport options.</p>
+<p>The complete set of transport options is replaced. To update a subset of the transport options, it is recommended to get the current transport options using <a href="../ranch.get_transport_options">ranch:get_transport_options(3)</a>, update them and then set them back using this function.</p>
+<p>Changes to the following options will take effect...</p>
+<ul><li>immediately:
+<ul><li><code>max_connections</code>
+</li>
+<li><code>handshake_timeout</code>
+</li>
+<li><code>shutdown</code>
+</li>
+</ul>
+</li>
+<li>only after the listener has been suspended and resumed:
+<ul><li><code>num_acceptors</code>
+</li>
+<li><code>num_listen_sockets</code>
+</li>
+<li><code>post_listen_callback</code>
+</li>
+<li><code>socket_opts</code>
+</li>
+</ul>
+</li>
+<li>only when the entire listener is restarted:
+<ul><li><code>connection_type</code>
+</li>
+<li><code>num_conns_sups</code>
+</li>
+<li><code>logger</code>
+</li>
+</ul>
+</li>
+</ul>
+<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 returned on success.</p>
+<p>An error tuple is returned on failure, for example if the given transport options contain invalid values.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: The restriction that the listener must be suspended has been removed.
+</li>
+<li><strong>2.0</strong>: The <code>TransOpts</code> argument must no longer contain Ranch-specific options if given as a list. Use a map.
+</li>
+</ul>
+<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.9
+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>
+<div class="listingblock"><div class="title">Update the listener TCP port within the `socket_opts` transport option</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">Ref</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
+
+<font color="#009900">TransOpts0</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_transport_options</font></b>(<font color="#009900">Ref</font>),
+#{<font color="#0000FF">socket_opts</font> <font color="#990000">=</font> <font color="#009900">SocketOpts0</font>} <font color="#990000">=</font> <font color="#009900">TransOpts0</font>,
+<font color="#009900">SocketOpts</font> <font color="#990000">=</font> [{<font color="#FF6600">port</font>, <font color="#993399">12345</font>}|<b><font color="#000000">proplists:delete</font></b>(<font color="#FF6600">port</font>, <font color="#009900">SocketOpts0</font>)],
+<font color="#009900">TransOpts</font> <font color="#990000">=</font> <font color="#009900">TransOpts0</font>#{<font color="#0000FF">socket_opts</font> <font color="#990000">=</font> <font color="#009900">SocketOpts</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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.start_listener/index.html b/docs/en/ranch/2.1/manual/ranch.start_listener/index.html
new file mode 100644
index 00000000..c36d91e7
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.start_listener/index.html
@@ -0,0 +1,246 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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>2.0</strong>: The <code>TransOpts</code> argument must no longer contain Ranch-specific options if given as a list. Use a map.
+</li>
+<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.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">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.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.stop_listener/index.html b/docs/en/ranch/2.1/manual/ranch.stop_listener/index.html
new file mode 100644
index 00000000..04f4e62c
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.stop_listener/index.html
@@ -0,0 +1,189 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.suspend_listener/index.html b/docs/en/ranch/2.1/manual/ranch.suspend_listener/index.html
new file mode 100644
index 00000000..7f49de7d
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.suspend_listener/index.html
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: 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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch.wait_for_connections/index.html b/docs/en/ranch/2.1/manual/ranch.wait_for_connections/index.html
new file mode 100644
index 00000000..596caa0e
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch.wait_for_connections/index.html
@@ -0,0 +1,213 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch/index.html b/docs/en/ranch/2.1/manual/ranch/index.html
new file mode 100644
index 00000000..656d8d80
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch/index.html
@@ -0,0 +1,338 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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><a href="../ranch.handshake">ranch:handshake(3)</a> - Perform the transport handshake
+</li>
+<li><a href="../ranch.handshake_continue">ranch:handshake_continue(3)</a> - Resume the paused transport handshake
+</li>
+<li><a href="../ranch.handshake_cancel">ranch:handshake_cancel(3)</a> - Cancel the paused transport handshake
+</li>
+<li><a href="../ranch.recv_proxy_header">ranch:recv_proxy_header(3)</a> - Receive the PROXY protocol header
+</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 per connection supervisor
+</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 per connection supervisor
+</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 address
+</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.9
+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 per connection supervisor.</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="_opts">opts()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">=</font> <b><font color="#000000">any</font></b>() | <b><font color="#000000">transport_opts</font></b>(<b><font color="#000000">any</font></b>())</tt></pre>
+</div></div>
+<p>Transport or socket options.</p>
+<h3 id="_ref">ref()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">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>
+<h3 id="_transport_opts_socketopts">transport_opts(SocketOpts)</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">transport_opts</font></b>(<font color="#009900">SocketOpts</font>) <font color="#990000">=</font> #{
+ <font color="#0000FF">alarms</font> <font color="#990000">=&gt;</font> #{
+ <b><font color="#000000">term</font></b>() <font color="#990000">=&gt;</font> #{
+ <font color="#FF6600">type</font> <font color="#990000">:=</font> <font color="#FF6600">num_connections</font>,
+ <font color="#FF6600">treshold</font> <font color="#990000">:=</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#FF6600">callback</font> <font color="#990000">:=</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">ref</font></b>(), <b><font color="#000000">term</font></b>(), <b><font color="#000080">pid</font></b>(), [<b><font color="#000080">pid</font></b>()]) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>()),
+ <font color="#0000FF">cooldown</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</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="#0000FF">num_conns_sups</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
+ <font color="#0000FF">post_listen_callback</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">term</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <b><font color="#000000">term</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_opts</font> <font color="#990000">=&gt;</font> <font color="#009900">SocketOpts</font>
+}</tt></pre>
+</div></div>
+<p>Transport options.</p>
+<p>The transport options are a combination of Ranch-specific options and transport-specific socket options.</p>
+<p>None of the options are required.</p>
+<dl><dt>alarms (#{})</dt>
+<dd><p>Alarms to call a function when the number of connections tracked by one connection supervisor reaches or exceeds a defined treshold.</p>
+<p>The map keys are the alarm names, which can be any <code>term</code>. The associated values are the respective alarm options, again in a map with the following keys:</p>
+<dl><dt>type</dt>
+<dd><p>Must be set to <code>num_connections</code>.</p>
+</dd>
+<dt>treshold</dt>
+<dd><p>Treshold value, which must be a <code>non_neg_integer</code>. When the number of connections tracked by a single connection supervisor reaches or exceeds this value, The alarm will trigger and call the function defined in the <code>callback</code> key (see below).</p>
+</dd>
+<dt>callback</dt>
+<dd><p>The alarm function, which takes the listener name, the alarm name, the pid of the connection supervisor and a list of the pids of all connection processes under that supervisor as arguments. The return value is ignored.</p>
+</dd>
+<dt>cooldown (5000)</dt>
+<dd><p>The minimum time after which the alarm can be triggered again, in milliseconds.</p>
+</dd>
+</dl>
+</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>logger (logger)</dt>
+<dd><p>The module that will be used to write log messages.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections per connection supervisor. 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>num_conns_sups - see below</dt>
+<dd><p>Number of processes that supervise connection processes. If not specified, defaults to be equal to <code>num_acceptors</code>.</p>
+</dd>
+<dt>post_listen_callback (fun(_ListenSock) -&gt; ok end)</dt>
+<dd><p>A function which will be called after a listen socket has been successfully created, with the socket as argument. It can be used to perform any necessary setup steps on the socket.</p>
+<p>If the callback function returns <code>ok</code>, the listener will start accepting connections on the socket. If it returns <code>{error, Reason}</code>, the listener will fail to start.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket_opts</dt>
+<dd><p>Socket options to be used by <code>Transport:listen/1</code>. Please refer to the documentation of the transport module you are using for more details.</p>
+</dd>
+</dl>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: The type <code>transport_opts(SocketOpts)</code> was added.
+</li>
+<li><strong>2.0</strong>: The function <code>ranch:accept_ack/1</code> was removed in favor of <a href="../ranch.handshake">ranch:handshake(3)</a>.
+</li>
+<li><strong>2.0</strong>: The option <code>max_connections</code> is now per connection supervisor.
+</li>
+<li><strong>2.0</strong>: The <code>num_conns_sup</code> option was added.
+</li>
+<li><strong>2.0</strong>: The <code>socket</code> option was removed.
+</li>
+<li><strong>2.0</strong>: The <code>logger</code> option is no longer experimental. It now defaults to <code>logger</code> instead of <code>error_logger</code>.
+</li>
+<li><strong>2.0</strong>: The <code>opt()</code> type was removed.
+</li>
+<li><strong>1.6</strong>: The experimental <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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_app/index.html b/docs/en/ranch/2.1/manual/ranch_app/index.html
new file mode 100644
index 00000000..ea3ec7d8
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_app/index.html
@@ -0,0 +1,201 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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>
+<li><a href="../ranch_proxy_header">ranch_proxy_header(3)</a> - PROXY protocol
+</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> - TCP 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.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_protocol/index.html b/docs/en/ranch/2.1/manual/ranch_protocol/index.html
new file mode 100644
index 00000000..8ef9d06f
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_protocol/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: 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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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="#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>2.0</strong>: The second argument <code>Socket</code> was removed.
+</li>
+<li><strong>1.6</strong>: The second argument <code>Socket</code> was deprecated. Call <a href="../ranch.handshake">ranch:handshake(3)</a> to obtain the socket.
+</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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_proxy_header.header/index.html b/docs/en/ranch/2.1/manual/ranch_proxy_header.header/index.html
new file mode 100644
index 00000000..14a6546f
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_proxy_header.header/index.html
@@ -0,0 +1,220 @@
+<!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_proxy_header:header(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_proxy_header:header(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_proxy_header:header - Build a PROXY protocol header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">header</font></b>(<font color="#009900">ProxyInfo</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">header</font></b>(<font color="#009900">ProxyInfo</font>, #{})
+<b><font color="#000000">header</font></b>(<font color="#009900">ProxyInfo</font>, <font color="#009900">BuildOpts</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">iodata</font></b>()
+
+<font color="#009900">ProxyInfo</font> <font color="#990000">::</font> <b><font color="#000000">ranch_proxy_header:proxy_info</font></b>()
+<font color="#009900">BuildOpts</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">checksum</font> <font color="#990000">=&gt;</font> <font color="#FF6600">crc32c</font>,
+ <font color="#0000FF">padding</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>() <i><font color="#9A1900">%% &gt;= 3</font></i>
+}</tt></pre>
+</div></div>
+<p>Build a PROXY protocol header.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>ProxyInfo</dt>
+<dd><p>The proxy information to encode.</p>
+</dd>
+<dt>BuildOpts</dt>
+<dd><p>Options to control whether to add a checksum or padding should be included in the encoded PROXY protocol header.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>The PROXY protocol header is returned.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.7</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Build a PROXY protocol header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">ProxyInfo</font> <font color="#990000">=</font> #{
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <font color="#993399">2</font>,
+ <b><font color="#000080">command</font></b> <font color="#990000">=&gt;</font> <font color="#FF6600">proxy</font>,
+
+ <font color="#0000FF">transport_family</font> <font color="#990000">=&gt;</font> <font color="#FF6600">ipv4</font>,
+ <font color="#0000FF">transport_protocol</font> <font color="#990000">=&gt;</font> <font color="#FF6600">stream</font>,
+
+ <font color="#0000FF">src_address</font> <font color="#990000">=&gt;</font> {<font color="#993399">192</font>, <font color="#993399">168</font>, <font color="#993399">1</font>, <font color="#993399">11</font>},
+ <font color="#0000FF">src_port</font> <font color="#990000">=&gt;</font> <font color="#993399">54321</font>,
+ <font color="#0000FF">dest_address</font> <font color="#990000">=&gt;</font> {<font color="#993399">192</font>, <font color="#993399">168</font>, <font color="#993399">1</font>, <font color="#993399">42</font>},
+ <font color="#0000FF">dest_port</font> <font color="#990000">=&gt;</font> <font color="#993399">443</font>
+},
+<font color="#009900">Data</font> <font color="#990000">=</font> <b><font color="#000000">ranch_proxy_header:parse</font></b>(<font color="#009900">ProxyInfo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Build a PROXY protocol header with checksum and padding</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">Data</font> <font color="#990000">=</font> <b><font color="#000000">ranch_proxy_header:parse</font></b>(<font color="#009900">ProxyInfo</font>, #{
+ <font color="#0000FF">checksum</font> <font color="#990000">=&gt;</font> <font color="#FF6600">crc32c</font>,
+ <font color="#0000FF">padding</font> <font color="#990000">=&gt;</font> <font color="#993399">7</font>
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch_proxy_header.header">ranch_proxy_header:header(3)</a>, <a href="../ranch_proxy_header">ranch_proxy_header(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_proxy_header.parse/index.html b/docs/en/ranch/2.1/manual/ranch_proxy_header.parse/index.html
new file mode 100644
index 00000000..4206fead
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_proxy_header.parse/index.html
@@ -0,0 +1,191 @@
+<!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_proxy_header:parse(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_proxy_header:parse(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_proxy_header:parse - Parse a PROXY protocol header</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">parse</font></b>(<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <b><font color="#000000">ranch_proxy_header:proxy_info</font></b>(), <font color="#009900">Rest</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}</tt></pre>
+</div></div>
+<p>Parse a PROXY protocol header.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>Data</dt>
+<dd><p>The PROXY protocol header optionally followed by more data.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>An <code>ok</code> tuple is returned on success, containing the proxy information found in the header and the rest of the data if more was provided.</p>
+<p>An <code>error</code> tuple is returned when a protocol error is detected. It contains a human readable message about the error.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.7</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Parse the PROXY protocol header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<font color="#FF6600">ok</font> <font color="#009900">ProxyInfo</font>, <font color="#009900">Rest</font>} <font color="#990000">=</font> <b><font color="#000000">ranch_proxy_header:parse</font></b>(<font color="#009900">Data</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch_proxy_header.header">ranch_proxy_header:header(3)</a>, <a href="../ranch_proxy_header.to_connection_info">ranch_proxy_header:to_connection_info(3)</a>, <a href="../ranch_proxy_header">ranch_proxy_header(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_proxy_header.to_connection_info/index.html b/docs/en/ranch/2.1/manual/ranch_proxy_header.to_connection_info/index.html
new file mode 100644
index 00000000..2515bcae
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_proxy_header.to_connection_info/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: ranch_proxy_header:to_connection_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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_proxy_header:to_connection_info(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_proxy_header:to_connection_info - Convert proxy_info() to ssl:connection_info()</p>
+<h2 id="_description">Description</h2>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">to_connection_info</font></b>(<font color="#009900">ProxyInfo</font> <font color="#990000">::</font> <b><font color="#000000">proxy_info</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">ssl:connection_info</font></b>()</tt></pre>
+</div></div>
+<p>Convert <code>ranch_proxy_header:proxy_info()</code> information to the <code>ssl:connection_info()</code> format returned by <code>ssl:connection_information/1,2</code>.</p>
+<h2 id="_arguments">Arguments</h2>
+<dl><dt>ProxyInfo</dt>
+<dd><p>The PROXY protocol information.</p>
+</dd>
+</dl>
+<h2 id="_return_value">Return value</h2>
+<p>Connection information is returned as a proplist.</p>
+<p>Because the PROXY protocol header includes limited information, only the keys <code>protocol</code>, <code>selected_cipher_suite</code> and <code>sni_hostname</code> will be returned, at most. All keys are optional.</p>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>2.1</strong>: Function introduced.
+</li>
+</ul>
+<h2 id="_examples">Examples</h2>
+<div class="listingblock"><div class="title">Convert the PROXY protocol information</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><font color="#009900">ConnInfo</font> <font color="#990000">=</font> <b><font color="#000000">ranch_proxy_header:to_connection_info</font></b>(<font color="#009900">ProxyInfo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_see_also">See also</h2>
+<p><a href="../ranch_proxy_header.parse">ranch_proxy_header:parse(3)</a>, <a href="../ranch_proxy_header">ranch_proxy_header(3)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_proxy_header/index.html b/docs/en/ranch/2.1/manual/ranch_proxy_header/index.html
new file mode 100644
index 00000000..ac7e16c5
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_proxy_header/index.html
@@ -0,0 +1,276 @@
+<!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_proxy_header(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_proxy_header(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_proxy_header - PROXY protocol</p>
+<h2 id="_description">Description</h2>
+<p>The module <code>ranch_proxy_header</code> provides functions for parsing and building the PROXY protocol header.</p>
+<h2 id="_exports">Exports</h2>
+<ul><li><a href="../ranch_proxy_header.parse">ranch_proxy_header:parse(3)</a> - Parse a PROXY protocol header
+</li>
+<li><a href="../ranch_proxy_header.header">ranch_proxy_header:header(3)</a> - Build a PROXY protocol header
+</li>
+<li><a href="../ranch_proxy_header.to_connection_info">ranch_proxy_header:to_connection_info(3)</a> - Convert proxy_info() to ssl:connection_info()
+</li>
+</ul>
+<h2 id="_types">Types</h2>
+<h3 id="_proxy_info">proxy_info()</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">proxy_info</font></b>() <font color="#990000">=</font> #{
+ <i><font color="#9A1900">%% Mandatory part.</font></i>
+ <font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#993399">1</font> | <font color="#993399">2</font>,
+ <font color="#FF6600">command</font> <font color="#990000">:=</font> <font color="#FF6600">local</font> | <font color="#FF6600">proxy</font>,
+ <font color="#0000FF">transport_family</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font> | <font color="#FF6600">ipv4</font> | <font color="#FF6600">ipv6</font> | <font color="#FF6600">unix</font>,
+ <font color="#0000FF">transport_protocol</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font> | <font color="#FF6600">stream</font> | <font color="#FF6600">dgram</font>,
+
+ <i><font color="#9A1900">%% Addresses.</font></i>
+ <font color="#0000FF">src_address</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:ip_address</font></b>() | <b><font color="#000080">binary</font></b>(),
+ <font color="#0000FF">src_port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">dest_address</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:ip_address</font></b>() | <b><font color="#000080">binary</font></b>(),
+ <font color="#0000FF">dest_port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+
+ <i><font color="#9A1900">%% Extra TLV-encoded data.</font></i>
+ <font color="#0000FF">alpn</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% US-ASCII.</font></i>
+ <font color="#0000FF">authority</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% UTF-8.</font></i>
+ <font color="#0000FF">netns</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% US-ASCII.</font></i>
+ <font color="#0000FF">ssl</font> <font color="#990000">=&gt;</font> #{
+ <font color="#FF6600">client</font> <font color="#990000">:=</font> [<font color="#FF6600">ssl</font> | <font color="#FF6600">cert_conn</font> | <font color="#FF6600">cert_sess</font>],
+ <font color="#FF6600">verified</font> <font color="#990000">:=</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% US-ASCII.</font></i>
+ <font color="#0000FF">cipher</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% US-ASCII.</font></i>
+ <font color="#0000FF">sig_alg</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% US-ASCII.</font></i>
+ <font color="#0000FF">key_alg</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% US-ASCII.</font></i>
+ <font color="#0000FF">cn</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% UTF-8.</font></i>
+ },
+
+ <i><font color="#9A1900">%% Unknown TLVs can't be parsed so the raw data is given.</font></i>
+ <font color="#0000FF">raw_tlvs</font> <font color="#990000">=&gt;</font> [{<font color="#993399">0</font><font color="#990000">..</font><font color="#993399">255</font>, <b><font color="#000080">binary</font></b>()}]
+}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The PROXY protocol information.</p>
+<p>The following fields may be found, although most of them are optional:</p>
+<dl><dt>version</dt>
+<dd><p>The PROXY protocol version used.</p>
+</dd>
+<dt>command</dt>
+<dd><p><code>proxy</code> is used for proxied connections. <code>local</code> for non-proxied connections. Those do not have any additional information.</p>
+</dd>
+<dt>transport_family</dt>
+<dd><p>The transport family of the original connection.</p>
+</dd>
+<dt>transport_protocol</dt>
+<dd><p>The transport protocol of the original connection.</p>
+</dd>
+<dt>src_address</dt>
+<dd><p>The source address of the original connection. This is the original address of the client.</p>
+</dd>
+<dt>src_port</dt>
+<dd><p>The source port of the original connection. This is the port the client opened on its end for the connection. It is not defined for UNIX domain sockets.</p>
+</dd>
+<dt>dest_address</dt>
+<dd><p>The destination address of the original connection.</p>
+</dd>
+<dt>dest_port</dt>
+<dd><p>The destination port of the original connection. It is not defined for UNIX domain sockets.</p>
+</dd>
+<dt>alpn</dt>
+<dd><p>The upper layer protocol in use over the connection. This is typically negotiated via the ALPN extension for TLS.</p>
+</dd>
+<dt>authority</dt>
+<dd><p>The host name serving as authority for the connection. This is typically passed using the SNI extension for TLS.</p>
+</dd>
+<dt>netns</dt>
+<dd><p>The namespace&apos;s name for the original connection.</p>
+</dd>
+<dt>ssl</dt>
+<dd><p>Various information pertaining to the original SSL/TLS connection.</p>
+<dl><dt>client</dt>
+<dd><p>A list containing a number of flags. <code>ssl</code> indicates that the client connected over SSL/TLS. <code>cert_conn</code> indicates that the client provided a certificate over the original connection. <code>cert_sess</code> indicates that the client provided a certificate at least once over the TLS session this connection belongs to.</p>
+</dd>
+<dt>verified</dt>
+<dd><p>Whether the client presented a certificate and it was successfully verified.</p>
+</dd>
+<dt>version</dt>
+<dd><p>The US-ASCII string containing the SSL/TLS version used for the original connection.</p>
+</dd>
+<dt>cipher</dt>
+<dd><p>The US-ASCII string name of the cipher used.</p>
+</dd>
+<dt>sig_alg</dt>
+<dd><p>The US-ASCII string name of the algorithm used to sign the certificate provided by the client.</p>
+</dd>
+<dt>key_alg</dt>
+<dd><p>The US-ASCII string name of the algorithm used to generate the key of the certificate provided by the client.</p>
+</dd>
+<dt>cn</dt>
+<dd><p>The UTF-8 string representation of the Common Name field of the client certificate&apos;s Distinguished Name.</p>
+</dd>
+</dl>
+</dd>
+<dt>raw_tlvs</dt>
+<dd><p>The non-standard TLVs that Ranch was not able to parse.</p>
+</dd>
+</dl>
+<h2 id="_changelog">Changelog</h2>
+<ul><li><strong>1.7</strong>: Module introduced.
+</li>
+</ul>
+<h2 id="_see_also">See also</h2>
+<p><a href="..">ranch(7)</a></p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_ssl/index.html b/docs/en/ranch/2.1/manual/ranch_ssl/index.html
new file mode 100644
index 00000000..ca990304
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_ssl/index.html
@@ -0,0 +1,384 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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.9
+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">anti_replay</font>, <font color="#FF6600">'10k'</font> | <font color="#FF6600">'100k'</font> | {<b><font color="#000080">integer</font></b>(), <b><font color="#000080">integer</font></b>(), <b><font color="#000080">integer</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">file:filename</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">file:filename</font></b>()}
+ | {<font color="#FF6600">ciphers</font>, <b><font color="#000000">ssl:ciphers</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">any</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>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">dh</font>, <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">dhfile</font>, <b><font color="#000000">file:filename</font></b>()}
+ | {<font color="#FF6600">eccs</font>, [<b><font color="#000000">ssl:named_curve</font></b>()]}
+ | {<font color="#FF6600">fail_if_no_peer_cert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">handshake</font>, <font color="#FF6600">hello</font> | <font color="#FF6600">full</font>}
+ | {<font color="#FF6600">hibernate_after</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">honor_cipher_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">honor_ecc_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">key</font>, <b><font color="#000000">ssl:key</font></b>()}
+ | {<font color="#FF6600">key_update_at</font>, <b><font color="#000000">pos_integer</font></b>()}
+ | {<font color="#FF6600">keyfile</font>, <b><font color="#000000">file:filename</font></b>()}
+ | {<font color="#FF6600">log_alert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">log_level</font>, <b><font color="#000000">logger:level</font></b>()}
+ | {<font color="#FF6600">max_handshake_size</font>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">middlebox_comp_mode</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>()}
+ | {<font color="#FF6600">password</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">protocol</font>, <font color="#FF6600">tls</font> | <font color="#FF6600">dtls</font>}
+ | {<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">session_tickets</font>, <font color="#FF6600">disabled</font> | <font color="#FF6600">stateful</font> | <font color="#FF6600">stateless</font>}
+ | {<font color="#FF6600">signature_algs</font>, [{<b><font color="#000000">ssl:hash</font></b>(), <b><font color="#000000">ssl:sign_algo</font></b>()}]}
+ | {<font color="#FF6600">signature_algs_cert</font>, [<b><font color="#000000">ssl:sign_scheme</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">supported_groups</font>, [<b><font color="#000000">ssl:group</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">verify</font>, <font color="#FF6600">verify_none</font> | <font color="#FF6600">verify_peer</font>}
+ | {<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="#000000">ssl:protocol_version</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>anti_replay</dt>
+<dd><p>Configures the server&apos;s built-in anti replay feature based on Bloom filters.</p>
+</dd>
+<dt>beast_mitigation (one_n_minus_one)</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>eccs</dt>
+<dd><p>List of named ECC curves.</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>handshake (full)</dt>
+<dd><p>If <code>hello</code> is specified for this option, the handshake is paused after receiving the client hello message. The handshake can then be resumed via <code>handshake_continue/3</code>, or cancelled via <code>handshake_cancel/1</code>.</p>
+<p>This option cannot be given to <code>ranch:handshake/1,2</code>.</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>honor_ecc_order (false)</dt>
+<dd><p>If true, use the server&apos;s preference for ECC curve selection. If false, use the client&apos;s preference.</p>
+</dd>
+<dt>key</dt>
+<dd><p>DER encoded user private key.</p>
+</dd>
+<dt>key_update_at</dt>
+<dd><p>Configures the maximum amount of bytes that can be sent on a TLS 1.3 connection before an automatic key update is performed.</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>log_level</dt>
+<dd><p>Specifies the log level for TLS/DTLS.</p>
+</dd>
+<dt>max_handshake_size (256*1024)</dt>
+<dd><p>Used to limit the size of valid TLS handshake packets to avoid DoS attacks.</p>
+</dd>
+<dt>middlebox_comp_mode (true)</dt>
+<dd><p>Configures the middlebox compatibility mode on a TLS 1.3 connection.</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>protocol (tls)</dt>
+<dd><p>Choose TLS or DTLS protocol for the transport layer security.</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>session_tickets</dt>
+<dd><p>Configures the session ticket functionality.</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>signature_algs_cert</dt>
+<dd><p>List of signature schemes for the signature_algs_cert extension introduced in TLS 1.3, in order to make special requirements on signatures used in certificates.</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>supported_groups([x25519, x448, secp256r1, secp384r1])</dt>
+<dd><p>TLS 1.3 introduces the <code>supported_groups</code> extension that is used for negotiating the Diffie-Hellman parameters in a TLS 1.3 handshake. Both client and server can specify a list of parameters that they are willing to use.</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>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="_changelog">Changelog</h2>
+<ul><li><strong>2.0</strong>: The <code>ssl_opt()</code> type was updated for OTP-23.0.
+</li>
+</ul>
+<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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_tcp/index.html b/docs/en/ranch/2.1/manual/ranch_tcp/index.html
new file mode 100644
index 00000000..f5bfa2aa
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_tcp/index.html
@@ -0,0 +1,286 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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>() | <b><font color="#000000">inet:local_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 network interfaces by default.</p>
+</dd>
+</dl>
+<p>On UNIX systems, it is also possible to use a UNIX Domain socket file by specifying <code>{local, SocketFile}</code>.</p>
+<dl><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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_transport.sendfile/index.html b/docs/en/ranch/2.1/manual/ranch_transport.sendfile/index.html
new file mode 100644
index 00000000..3677b19f
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_transport.sendfile/index.html
@@ -0,0 +1,220 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/2.1/manual/ranch_transport/index.html b/docs/en/ranch/2.1/manual/ranch_transport/index.html
new file mode 100644
index 00000000..dea04f2c
--- /dev/null
+++ b/docs/en/ranch/2.1/manual/ranch_transport/index.html
@@ -0,0 +1,427 @@
+<!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=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>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.9
+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.9
+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.9
+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.9
+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.9
+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.9
+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.9
+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">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">ok</font>, <font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}
+
+<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">opts</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">ok</font>, <font color="#009900">Socket</font> <font color="#990000">::</font> <b><font color="#000000">socket</font></b>(), <font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</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>If the handshake is completed by this call, the function will return <code>{ok, Socket}</code>. However, some transports (notably, <code>ranch_ssl</code> if <code>{handshake, hello}</code> is specified in the socket options) may pause the handshake at a certain point and return <code>{ok, Socket, Info}</code> instead, in order to allow for additional decisions to be made before resuming the handshake with <code>handshake_continue/3</code> or cancelling it with <code>handshake_cancel/1</code>.</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="_handshake_continue">handshake_continue</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">handshake_continue</font></b>(<font color="#009900">Socket0</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>, <b><font color="#000000">any</font></b>()}
+
+<b><font color="#000000">handshake_continue</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">opts</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>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Resume the paused transport-level handshake and return a socket that is ready to use.</p>
+<p>This function will be called by connection processes to resume a paused handshake.</p>
+<h3 id="_handshake_cancel">handshake_cancel</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">handshake_cancel</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>Cancel the paused transport-level handshake.</p>
+<h3 id="_listen">listen</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">listen</font></b>(<font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch:transport_opts</font></b>(<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 port given in the socket options.</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.9
+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>(),
+ <font color="#009900">Passive</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.9
+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.9
+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">local</font>, <b><font color="#000080">binary</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>
+<p>For UNIX Domain sockets the return value will be <code>{local, PeerSocket}</code>, with <code>PeerSocket</code> typically an empty binary.</p>
+<h3 id="_recv">recv</h3>
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><b><font color="#000000">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.9
+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.9
+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.9
+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.9
+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.9
+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.9
+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>
+<p>For UNIX Domain sockets the return value will be <code>{local, SocketFile}</code>.</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.9
+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.9
+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>2.0</strong>: The callback <code>listen/1</code> has changed to accept a map of transport options instead of socket options.
+</li>
+<li><strong>2.0</strong>: The callback <code>messages/0</code> return value was updated to include the passive message for <code>{active, N}</code>.
+</li>
+<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
+ 2.1
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/2.1/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/2.1/manual">2.1</a></li>
+
+ <li><a href="/docs/en/ranch/2.0/manual">2.0</a></li>
+
+ <li><a href="/docs/en/ranch/1.8/manual">1.8</a></li>
+
+ <li><a href="/docs/en/ranch/1.7/manual">1.7</a></li>
+
+ <li><a href="/docs/en/ranch/1.6/manual">1.6</a></li>
+
+</ul>
+
+<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
+<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="[email protected]">
+<input type="hidden" name="lc" value="FR">
+<input type="hidden" name="item_name" value="Loic Hoguin">
+<input type="hidden" name="item_number" value="99s">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
+<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
+</form><p>Recurring payment options are also available via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.</p>
+
+
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+