diff options
author | Loïc Hoguin <[email protected]> | 2017-10-03 15:50:36 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-10-03 15:50:36 +0200 |
commit | 5cb08c35580023b91091c93f9a1f9198e35055c2 (patch) | |
tree | fcac3159b52e14db41d5f1d1b19f5d8530cc0d74 /docs/en/ranch/1.3/guide/listeners | |
parent | 35bc482f0be143abd728a228e937984dc5f6cc73 (diff) | |
download | ninenines.eu-5cb08c35580023b91091c93f9a1f9198e35055c2.tar.gz ninenines.eu-5cb08c35580023b91091c93f9a1f9198e35055c2.tar.bz2 ninenines.eu-5cb08c35580023b91091c93f9a1f9198e35055c2.zip |
Fix some links and add Ranch 1.4 docs
They were mistakenly labeled as 1.3. Sorry!
Diffstat (limited to 'docs/en/ranch/1.3/guide/listeners')
-rw-r--r-- | docs/en/ranch/1.3/guide/listeners/index.html | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/docs/en/ranch/1.3/guide/listeners/index.html b/docs/en/ranch/1.3/guide/listeners/index.html index bb7f3310..f21f169e 100644 --- a/docs/en/ranch/1.3/guide/listeners/index.html +++ b/docs/en/ranch/1.3/guide/listeners/index.html @@ -105,7 +105,7 @@ A protocol handler and its associated options. </ul></div> <div class="paragraph"><p>Ranch includes both TCP and SSL transport handlers, respectively <code>ranch_tcp</code> and <code>ranch_ssl</code>.</p></div> -<div class="paragraph"><p>A listener can be started by calling the <code>ranch:start_listener/5</code> +<div class="paragraph"><p>A listener can be started by calling the <code>ranch:start_listener/6</code> function. Before doing so however, you must ensure that the <code>ranch</code> application is started.</p></div> <div class="listingblock"> @@ -124,7 +124,7 @@ to the <code>echo_protocol</code> handler.</p></div> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, +<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>, <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}], <span style="color: #FF6600">echo_protocol</span>, [] )<span style="color: #990000">.</span></tt></pre></div></div> @@ -196,14 +196,14 @@ can be overriden at listener startup.</p></div> the port number 0, or if you omit the port number entirely, Ranch will start listening on a random port.</p></div> <div class="paragraph"><p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The -argument is the name of the listener you gave in <code>ranch:start_listener/5</code>.</p></div> +argument is the name of the listener you gave in <code>ranch:start_listener/6</code>.</p></div> <div class="listingblock"> <div class="title">Starting a listener for TCP connections on a random port</div> <div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, +<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>, <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">0</span>}], <span style="color: #FF6600">echo_protocol</span>, [] )<span style="color: #990000">.</span> @@ -254,7 +254,7 @@ connections are handled optimally.</p></div> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, +<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>, <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #993399">100</span>}], <span style="color: #FF6600">echo_protocol</span>, [] )<span style="color: #990000">.</span></tt></pre></div></div> @@ -265,7 +265,7 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, +<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>, <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #FF6600">infinity</span>}], <span style="color: #FF6600">echo_protocol</span>, [] )<span style="color: #990000">.</span></tt></pre></div></div> @@ -308,27 +308,6 @@ http://www.gnu.org/software/src-highlite --> </div> </div> <div class="sect1"> -<h2 id="_customizing_the_number_of_acceptor_processes">Customizing the number of acceptor processes</h2> -<div class="sectionbody"> -<div class="paragraph"><p>By default Ranch will use 10 acceptor processes. Their role is -to accept connections and spawn a connection process for every -new connection.</p></div> -<div class="paragraph"><p>This number can be tweaked to improve performance. A good -number is typically between 10 or 100 acceptors. You must -measure to find the best value for your application.</p></div> -<div class="listingblock"> -<div class="title">Specifying a custom number of acceptor processes</div> -<div class="content"><!-- Generator: GNU source-highlight 3.1.8 -by Lorenzo Bettini -http://www.lorenzobettini.it -http://www.gnu.org/software/src-highlite --> -<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, - <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">num_acceptors</span>, <span style="color: #993399">42</span>}], - <span style="color: #FF6600">echo_protocol</span>, [] -)<span style="color: #990000">.</span></tt></pre></div></div> -</div> -</div> -<div class="sect1"> <h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2> <div class="sectionbody"> <div class="paragraph"><p>Operating systems have limits on the number of sockets @@ -397,7 +376,7 @@ http://www.gnu.org/software/src-highlite --> </div> </div> <div class="sect1"> -<h2 id="_obtaining_information_about_listeners">Obtaining information about listeners</h2> +<h2 id="_obtain_information_about_listeners">Obtain information about listeners</h2> <div class="sectionbody"> <div class="paragraph"><p>Ranch provides two functions for retrieving information about the listeners, for reporting and diagnostic purposes.</p></div> @@ -484,6 +463,8 @@ http://www.gnu.org/software/src-highlite --> + <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li> + <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li> <li><a href="/docs/en/ranch/1.2/guide">1.2</a></li> |