Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > de7065e4b54995254f1bf4d0978309a4 > files > 31

erlang-ranch-0.6.2-1.fc18.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Module ranch_listener</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>

<h1>Module ranch_listener</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Public API for managing listeners.

<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>

<h2><a name="description">Description</a></h2>Public API for managing listeners.
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#add_connection-2">add_connection/2</a></td><td>Add a connection to the listener's pool.</td></tr>
<tr><td valign="top"><a href="#get_max_connections-1">get_max_connections/1</a></td><td>Return the max number of connections allowed concurrently.</td></tr>
<tr><td valign="top"><a href="#get_port-1">get_port/1</a></td><td>Return the listener's port.</td></tr>
<tr><td valign="top"><a href="#get_protocol_options-1">get_protocol_options/1</a></td><td>Return the current protocol options.</td></tr>
<tr><td valign="top"><a href="#remove_connection-1">remove_connection/1</a></td><td>Remove this process' connection from the pool.</td></tr>
<tr><td valign="top"><a href="#set_max_connections-2">set_max_connections/2</a></td><td>Set the max number of connections allowed concurrently.</td></tr>
<tr><td valign="top"><a href="#set_protocol_options-2">set_protocol_options/2</a></td><td>Upgrade the protocol options.</td></tr>
</table>

<h2><a name="functions">Function Details</a></h2>

<h3 class="function"><a name="add_connection-2">add_connection/2</a></h3>
<div class="spec">
<p><tt>add_connection(ServerPid::pid(), ConnPid::pid()) -&gt; non_neg_integer()</tt><br></p>
</div><p>Add a connection to the listener's pool.</p>

<h3 class="function"><a name="get_max_connections-1">get_max_connections/1</a></h3>
<div class="spec">
<p><tt>get_max_connections(ServerPid::pid()) -&gt; {ok, <a href="ranch.html#type-max_conns">ranch:max_conns()</a>}</tt><br></p>
</div><p>Return the max number of connections allowed concurrently.</p>

<h3 class="function"><a name="get_port-1">get_port/1</a></h3>
<div class="spec">
<p><tt>get_port(ServerPid::pid()) -&gt; {ok, <a href="inet.html#type-port_number">inet:port_number()</a>}</tt><br></p>
</div><p>Return the listener's port.</p>

<h3 class="function"><a name="get_protocol_options-1">get_protocol_options/1</a></h3>
<div class="spec">
<p><tt>get_protocol_options(ServerPid::pid()) -&gt; {ok, any()}</tt><br></p>
</div><p>Return the current protocol options.</p>

<h3 class="function"><a name="remove_connection-1">remove_connection/1</a></h3>
<div class="spec">
<p><tt>remove_connection(ServerPid::pid()) -&gt; non_neg_integer()</tt><br></p>
</div><p><p>Remove this process' connection from the pool.</p>
 
  Useful if you have long-lived connections that aren't taking up
  resources and shouldn't be counted in the limited number of running
  connections.</p>

<h3 class="function"><a name="set_max_connections-2">set_max_connections/2</a></h3>
<div class="spec">
<p><tt>set_max_connections(ServerPid::pid(), MaxConnections::<a href="ranch.html#type-max_conns">ranch:max_conns()</a>) -&gt; ok</tt><br></p>
</div><p>Set the max number of connections allowed concurrently.</p>

<h3 class="function"><a name="set_protocol_options-2">set_protocol_options/2</a></h3>
<div class="spec">
<p><tt>set_protocol_options(ServerPid::pid(), ProtoOpts::any()) -&gt; ok</tt><br></p>
</div><p>Upgrade the protocol options.</p>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Mar 9 2013, 09:38:59.</i></p>
</body>
</html>