summaryrefslogtreecommitdiffstats
path: root/docs/en/ranch/1.4/manual/ranch
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-13 09:54:12 +0200
committerLoïc Hoguin <[email protected]>2018-06-13 09:54:12 +0200
commit92b54aacc0de5446dd5497c39897b0bbff72e626 (patch)
treec3a98cfec636d1271f5804e5c19b35b208bba00d /docs/en/ranch/1.4/manual/ranch
parent8b5c3dc972b99f174750123c9e4abc96259c34a9 (diff)
downloadninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.gz
ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.bz2
ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.zip
Rebuild using Asciideck
Diffstat (limited to 'docs/en/ranch/1.4/manual/ranch')
-rw-r--r--docs/en/ranch/1.4/manual/ranch/index.html771
1 files changed, 219 insertions, 552 deletions
diff --git a/docs/en/ranch/1.4/manual/ranch/index.html b/docs/en/ranch/1.4/manual/ranch/index.html
index b77d7548..2dfdd506 100644
--- a/docs/en/ranch/1.4/manual/ranch/index.html
+++ b/docs/en/ranch/1.4/manual/ranch/index.html
@@ -62,567 +62,232 @@
<h1 class="lined-header"><span>ranch(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - socket acceptor pool</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - socket acceptor pool</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> module provides functions for starting and
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> module provides functions for starting and manipulating Ranch listeners.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_max_conns_non_neg_integer_infinity">max_conns() = non_neg_integer() | infinity</h3>
-<div class="paragraph"><p>Maximum number of connections allowed on this listener.</p></div>
-<div class="paragraph"><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></div>
-</div>
-<div class="sect2">
+<h3 id="_max_conns_____non_neg_integer_____infinity">max_conns() = non_neg_integer() | infinity</h3>
+<p>Maximum number of connections allowed on this listener.</p>
+<p>This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</p>
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">ack_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">connection_type</span>, <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>}
- | {<span style="color: #FF6600">max_connections</span>, <span style="font-weight: bold"><span style="color: #000000">max_conns</span></span>()}
- | {<span style="color: #FF6600">num_acceptors</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}
- | {<span style="color: #000080">shutdown</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>() | <span style="color: #FF6600">brutal_kill</span>}
- | {<span style="color: #FF6600">socket</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Ranch-specific transport options.</p></div>
-<div class="paragraph"><p>These options are not passed on to the transports.
-They are used by Ranch while setting up the listeners.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_ref_any">ref() = any()</h3>
-<div class="paragraph"><p>Unique name used to refer to a listener.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">ack_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">connection_type</font>, <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>}
+ | {<font color="#FF6600">max_connections</font>, <b><font color="#000000">max_conns</font></b>()}
+ | {<font color="#FF6600">num_acceptors</font>, <b><font color="#000000">pos_integer</font></b>()}
+ | {<font color="#000080">shutdown</font>, <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>}
+ | {<font color="#FF6600">socket</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Ranch-specific transport options.</p>
+<p>These options are not passed on to the transports. They are used by Ranch while setting up the listeners.</p>
+<h3 id="_ref_____any">ref() = any()</h3>
+<p>Unique name used to refer to a listener.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ack_timeout (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.
-</p>
-</dd>
-<dt class="hdlist1">
-connection_type (worker)
-</dt>
-<dd>
-<p>
- Type of process that will handle the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections (1024)
-</dt>
-<dd>
-<p>
- Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.
-</p>
-</dd>
-<dt class="hdlist1">
-num_acceptors (10)
-</dt>
-<dd>
-<p>
- Number of processes that accept connections.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for children to stop on listener shutdown.
-</p>
-</dd>
-<dt class="hdlist1">
-socket
-</dt>
-<dd>
-<p>
- Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<p>None of the options are required.</p>
+<dl><dt>ack_timeout (5000)</dt>
+<dd><p>Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.</p>
+</dd>
+<dt>connection_type (worker)</dt>
+<dd><p>Type of process that will handle the connection.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.</p>
+</dd>
+<dt>num_acceptors (10)</dt>
+<dd><p>Number of processes that accept connections.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket</dt>
+<dd><p>Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.</p>
+</dd>
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_ack_ref_8594_ok">accept_ack(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Acknowledge that the connection is accepted.</p></div>
-<div class="paragraph"><p>This function MUST be used by a connection process to inform
-Ranch that it initialized properly and let it perform any
-additional operations before the socket can be safely used.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_child_spec_ref_numacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; supervisor:child_spec()</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NumAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return child specifications for a new listener.</p></div>
-<div class="paragraph"><p>This function can be used to embed a listener directly
-in an application instead of letting Ranch handle it.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_addr_ref_8594_ip_port">get_addr(Ref) &#8594; {IP, Port}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the interface used by this listener.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP address and port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_max_connections_ref_8594_maxconns">get_max_connections(Ref) &#8594; MaxConns</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-Current maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the max number of connections allowed for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_port_ref_8594_port">get_port(Ref) &#8594; Port</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_protocol_options_ref_8594_protoopts">get_protocol_options(Ref) &#8594; ProtoOpts</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Current protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the protocol options set for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_info_8594_ref_key_value">info() &#8594; [{Ref, [{Key, Value}]}]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Key = atom()
-</dt>
-<dd>
-<p>
-Information key.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
-<p>
-Information value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return detailed information about all Ranch listeners.</p></div>
-<div class="paragraph"><p>The following keys are defined:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-pid
-</dt>
-<dd>
-<p>
-Pid of the listener&#8217;s top-level supervisor.
-</p>
-</dd>
-<dt class="hdlist1">
-ip
-</dt>
-<dd>
-<p>
-Interface Ranch listens on.
-</p>
-</dd>
-<dt class="hdlist1">
-port
-</dt>
-<dd>
-<p>
-Port number Ranch listens on.
-</p>
-</dd>
-<dt class="hdlist1">
-num_acceptors
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections
-</dt>
-<dd>
-<p>
-Maximum number of connections.
-</p>
-</dd>
-<dt class="hdlist1">
-active_connections
-</dt>
-<dd>
-<p>
-Number of active connections.
-</p>
-</dd>
-<dt class="hdlist1">
-all_connections
-</dt>
-<dd>
-<p>
-Number of connections, including those removed from the count.
-</p>
-</dd>
-<dt class="hdlist1">
-transport
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-transport_options
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-protocol
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-protocol_options
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-</div>
-<div class="sect2">
-<h3 id="_procs_ref_acceptors_connections_8594_pid">procs(Ref, acceptors | connections) &#8594; [pid()]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return all acceptor or connection processes for one listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_remove_connection_ref_8594_ok">remove_connection(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Do not count this connection when limiting the number of connections.</p></div>
-<div class="paragraph"><p>You can use this function for long-running connection processes
-which spend most of their time idling rather than consuming
-resources. This allows Ranch to accept a lot more connections
-without sacrificing the latency of the system.</p></div>
-<div class="paragraph"><p>This function may only be called from a connection process.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_max_connections_ref_maxconns_8594_ok">set_max_connections(Ref, MaxConns) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-New maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the max number of connections for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately. If the new value is
-smaller than the previous one, Ranch will not kill the extra
-connections, but will wait for them to terminate properly.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_protocol_options_ref_protoopts_8594_ok">set_protocol_options(Ref, ProtoOpts) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-New protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the protocol options for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately for all new connections.
-Old connections will not receive the new options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_start_listener_ref_numacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; {ok, pid()} | {error, badarg}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NumAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for connections using the given transport
-and protocol. Returns the pid for this listener&#8217;s supervisor.</p></div>
-<div class="paragraph"><p>There are additional transport options that apply
-regardless of transport. They allow configuring how the
-connections are supervised, rate limited and more. Please
-consult the previous section for more details.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Stop the given listener.</p></div>
-<div class="paragraph"><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></div>
-<div class="paragraph"><p>This function does not return until the listener is
-completely stopped.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_accept_ack_ref_____ok">accept_ack(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Acknowledge that the connection is accepted.</p>
+<p>This function MUST be used by a connection process to inform Ranch that it initialized properly and let it perform any additional operations before the socket can be safely used.</p>
+<h3 id="_child_spec_ref__numacceptors__transport__transopts__protocol__protoopts_____supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; supervisor:child_spec()</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Return child specifications for a new listener.</p>
+<p>This function can be used to embed a listener directly in an application instead of letting Ranch handle it.</p>
+<h3 id="_get_addr_ref______ip__port">get_addr(Ref) -&gt; {IP, Port}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the interface used by this listener.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the IP address and port for the given listener.</p>
+<h3 id="_get_max_connections_ref_____maxconns">get_max_connections(Ref) -&gt; MaxConns</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>Current maximum number of connections.</p>
+</dd>
+</dl>
+<p>Return the max number of connections allowed for the given listener.</p>
+<h3 id="_get_port_ref_____port">get_port(Ref) -&gt; Port</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the port for the given listener.</p>
+<h3 id="_get_protocol_options_ref_____protoopts">get_protocol_options(Ref) -&gt; ProtoOpts</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Current protocol options.</p>
+</dd>
+</dl>
+<p>Return the protocol options set for the given listener.</p>
+<h3 id="_info________ref____key__value">info() -&gt; [{Ref, [{Key, Value}]}]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Key = atom()</dt>
+<dd><p>Information key.</p>
+</dd>
+<dt>Value = any()</dt>
+<dd><p>Information value.</p>
+</dd>
+</dl>
+<p>Return detailed information about all Ranch listeners.</p>
+<p>The following keys are defined:</p>
+<dl><dt>pid</dt>
+<dd><p>Pid of the listener&apos;s top-level supervisor.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface Ranch listens on.</p>
+</dd>
+<dt>port</dt>
+<dd><p>Port number Ranch listens on.</p>
+</dd>
+<dt>num_acceptors</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>max_connections</dt>
+<dd><p>Maximum number of connections.</p>
+</dd>
+<dt>active_connections</dt>
+<dd><p>Number of active connections.</p>
+</dd>
+<dt>all_connections</dt>
+<dd><p>Number of connections, including those removed from the count.</p>
+</dd>
+<dt>transport</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>transport_options</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>protocol</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>protocol_options</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<h3 id="_procs_ref__acceptors___connections______pid">procs(Ref, acceptors | connections) -&gt; [pid()]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Return all acceptor or connection processes for one listener.</p>
+<h3 id="_remove_connection_ref_____ok">remove_connection(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Do not count this connection when limiting the number of connections.</p>
+<p>You can use this function for long-running connection processes which spend most of their time idling rather than consuming resources. This allows Ranch to accept a lot more connections without sacrificing the latency of the system.</p>
+<p>This function may only be called from a connection process.</p>
+<h3 id="_set_max_connections_ref__maxconns_____ok">set_max_connections(Ref, MaxConns) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>New maximum number of connections.</p>
+</dd>
+</dl>
+<p>Set the max number of connections for the given listener.</p>
+<p>The change will be applied immediately. If the new value is smaller than the previous one, Ranch will not kill the extra connections, but will wait for them to terminate properly.</p>
+<h3 id="_set_protocol_options_ref__protoopts_____ok">set_protocol_options(Ref, ProtoOpts) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>New protocol options.</p>
+</dd>
+</dl>
+<p>Set the protocol options for the given listener.</p>
+<p>The change will be applied immediately for all new connections. Old connections will not receive the new options.</p>
+<h3 id="_start_listener_ref__numacceptors__transport__transopts__protocol__protoopts______ok__pid_______error__badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; {ok, pid()} | {error, badarg}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Start listening for connections using the given transport and protocol. Returns the pid for this listener&apos;s supervisor.</p>
+<p>There are additional transport options that apply regardless of transport. They allow configuring how the connections are supervised, rate limited and more. Please consult the previous section for more details.</p>
+<h3 id="_stop_listener_ref_____ok____error__not_found">stop_listener(Ref) -&gt; ok | {error, not_found}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Stop the given 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>This function does not return until the listener is completely stopped.</p>
+
@@ -657,6 +322,8 @@ completely stopped.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>