This repository has been archived by the owner on Oct 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ce1bc56
Showing
40 changed files
with
9,580 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html> | ||
<head> | ||
<title>The sockerl application</title> | ||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc"> | ||
</head> | ||
<body bgcolor="white"> | ||
<h2 class="indextitle">Modules</h2> | ||
<table width="100%" border="0" summary="list of modules"> | ||
<tr><td><a href="sockerl.html" target="overviewFrame" class="module">sockerl</a></td></tr> | ||
<tr><td><a href="sockerl_metadata.html" target="overviewFrame" class="module">sockerl_metadata</a></td></tr> | ||
<tr><td><a href="sockerl_transporter.html" target="overviewFrame" class="module">sockerl_transporter</a></td></tr> | ||
<tr><td><a href="sockerl_types.html" target="overviewFrame" class="module">sockerl_types</a></td></tr></table> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>Module sockerl</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 sockerl</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> | ||
API functions. | ||
|
||
<p><b>Version:</b> </p> | ||
<p><b>This module defines the <tt>sockerl</tt> behaviour.</b><br> Required callback functions: <tt>connector_init/2</tt>, <tt>handle_packet/3</tt>, <tt>handle_disconnect/2</tt>, <tt>terminate/3</tt>, <tt>code_change/3</tt>.</p> | ||
<p><b>Authors:</b> Pouriya Jahanbakhsh (<a href="mailto:pouriya.jahanbakhsh@gmail.com"><tt>pouriya.jahanbakhsh@gmail.com</tt></a>).</p> | ||
|
||
<h2><a name="description">Description</a></h2> | ||
API functions. | ||
<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="#get_pool_connections-1">get_pool_connections/1</a></td><td> | ||
Returns all available pool connections.</td></tr> | ||
<tr><td valign="top"><a href="#get_server_connections-1">get_server_connections/1</a></td><td> | ||
Returns all available server connections.</td></tr> | ||
<tr><td valign="top"><a href="#send_async-2">send_async/2</a></td><td> | ||
Sends packet asynchronously through connector.</td></tr> | ||
<tr><td valign="top"><a href="#send_sync-2">send_sync/2</a></td><td> | ||
Sends packet synchronously through connector.</td></tr> | ||
<tr><td valign="top"><a href="#send_sync-3">send_sync/3</a></td><td> | ||
Sends packet synchronously through connector with timeout.</td></tr> | ||
<tr><td valign="top"><a href="#sleep_acceptors-1">sleep_acceptors/1</a></td><td> | ||
Turns all server acceptors to sleep mode.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_connector-4">start_link_connector/4</a></td><td> | ||
Starts and links a socket connection process.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_connector-5">start_link_connector/5</a></td><td> | ||
Starts and links a socket connection process.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_connector-6">start_link_connector/6</a></td><td> | ||
Starts and links a socket connection process.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_connector_pool-4">start_link_connector_pool/4</a></td><td> | ||
Starts and links a socket connection pool.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_connector_pool-5">start_link_connector_pool/5</a></td><td> | ||
Starts and links a socket connection pool.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_connector_pool-6">start_link_connector_pool/6</a></td><td> | ||
Starts and links a socket connection pool.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_server-3">start_link_server/3</a></td><td> | ||
Starts and links a socket server.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_server-4">start_link_server/4</a></td><td> | ||
Starts and links a socket server.</td></tr> | ||
<tr><td valign="top"><a href="#start_link_server-5">start_link_server/5</a></td><td> | ||
Starts and links a socket server.</td></tr> | ||
<tr><td valign="top"><a href="#stop_connector-1">stop_connector/1</a></td><td> | ||
Stops connector.</td></tr> | ||
<tr><td valign="top"><a href="#stop_connector-2">stop_connector/2</a></td><td> | ||
Stops connector with specific reason.</td></tr> | ||
<tr><td valign="top"><a href="#stop_pool-1">stop_pool/1</a></td><td> | ||
stops pool and all connections it has.</td></tr> | ||
<tr><td valign="top"><a href="#stop_pool-2">stop_pool/2</a></td><td> | ||
stops pool and all connections it has with specific reason.</td></tr> | ||
<tr><td valign="top"><a href="#stop_server-1">stop_server/1</a></td><td> | ||
stops server and all connections it has.</td></tr> | ||
<tr><td valign="top"><a href="#stop_server-2">stop_server/2</a></td><td> | ||
stops server and all connections it has.</td></tr> | ||
<tr><td valign="top"><a href="#wakeup_acceptors-1">wakeup_acceptors/1</a></td><td> | ||
Turns all server acceptors to accept mode.</td></tr> | ||
</table> | ||
|
||
<h2><a name="functions">Function Details</a></h2> | ||
|
||
<h3 class="function"><a name="get_pool_connections-1">get_pool_connections/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>get_pool_connections(Pool::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>) -> [] | [{<a href="sockerl_types.html#type-socket">sockerl_types:socket()</a>, pid()}]</tt><br></p> | ||
</div><p> | ||
Returns all available pool connections.</p> | ||
|
||
<h3 class="function"><a name="get_server_connections-1">get_server_connections/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>get_server_connections(Server::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>) -> [] | [{<a href="sockerl_types.html#type-socket">sockerl_types:socket()</a>, pid()}]</tt><br></p> | ||
</div><p> | ||
Returns all available server connections.</p> | ||
|
||
<h3 class="function"><a name="send_async-2">send_async/2</a></h3> | ||
<div class="spec"> | ||
<p><tt>send_async(Con::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>, Packet::<a href="sockerl_types.html#type-packet">sockerl_types:packet()</a>) -> ok</tt><br></p> | ||
</div><p> | ||
Sends packet asynchronously through connector.</p> | ||
|
||
<h3 class="function"><a name="send_sync-2">send_sync/2</a></h3> | ||
<div class="spec"> | ||
<p><tt>send_sync(Con::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>, Packet::<a href="sockerl_types.html#type-packet">sockerl_types:packet()</a>) -> ok | <a href="sockerl_types.html#type-error">sockerl_types:error()</a></tt><br></p> | ||
</div><p> | ||
Sends packet synchronously through connector.</p> | ||
|
||
<h3 class="function"><a name="send_sync-3">send_sync/3</a></h3> | ||
<div class="spec"> | ||
<p><tt>send_sync(Con::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>, Packet::<a href="sockerl_types.html#type-packet">sockerl_types:packet()</a>, Timeout::timeout()) -> ok | <a href="sockerl_types.html#type-error">sockerl_types:error()</a></tt><br></p> | ||
</div><p> | ||
Sends packet synchronously through connector with timeout.</p> | ||
|
||
<h3 class="function"><a name="sleep_acceptors-1">sleep_acceptors/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>sleep_acceptors(Server::<a href="sockerl_server_sup.html#type-server">sockerl_server_sup:server()</a>) -> ok</tt><br></p> | ||
</div><p> | ||
Turns all server acceptors to sleep mode.</p> | ||
|
||
<h3 class="function"><a name="start_link_connector-4">start_link_connector/4</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_connector(Mod::module(), InitArg::term(), Host::<a href="inet.html#type-hostname">inet:hostname()</a>, Port::<a href="inet.html#type-port_number">inet:port_number()</a>) -> <a href="sockerl_connector.html#type-start_return">sockerl_connector:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket connection process.</p> | ||
|
||
<h3 class="function"><a name="start_link_connector-5">start_link_connector/5</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_connector(Name_or_Mod::<a href="sockerl_connector_sup.html#type-register_name">sockerl_connector_sup:register_name()</a> | module(), Mod_or_InitArg::module() | term(), InitArg_or_Host::term() | <a href="inet.html#type-hostname">inet:hostname()</a>, Host_or_Port::<a href="inet.html#type-hostname">inet:hostname()</a> | <a href="inet.html#type-port_number">inet:port_number()</a>, Port_or_Opts::<a href="inet.html#type-port_number">inet:port_number()</a> | <a href="sockerl_connector.html#type-start_options">sockerl_connector:start_options()</a>) -> <a href="sockerl_connector.html#type-start_return">sockerl_connector:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket connection process.</p> | ||
|
||
<h3 class="function"><a name="start_link_connector-6">start_link_connector/6</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_connector(Name::<a href="sockerl_connector_sup.html#type-register_name">sockerl_connector_sup:register_name()</a>, Mod::module(), InitArg::term(), Host::<a href="inet.html#type-hostname">inet:hostname()</a>, Port::<a href="inet.html#type-port_number">inet:port_number()</a>, Opts::<a href="sockerl_connector.html#type-start_options">sockerl_connector:start_options()</a>) -> <a href="sockerl_connector.html#type-start_return">sockerl_connector:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket connection process.</p> | ||
|
||
<h3 class="function"><a name="start_link_connector_pool-4">start_link_connector_pool/4</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_connector_pool(Mod::module(), InitArg::term(), Host::<a href="inet.html#type-hostname">inet:hostname()</a>, Port::<a href="inet.html#type-port_number">inet:port_number()</a>) -> <a href="sockerl_connector_sup.html#type-start_return">sockerl_connector_sup:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket connection pool.</p> | ||
|
||
<h3 class="function"><a name="start_link_connector_pool-5">start_link_connector_pool/5</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_connector_pool(Name_or_Mod::<a href="sockerl_connector_sup.html#type-register_name">sockerl_connector_sup:register_name()</a> | module(), Mod_or_InitArg::module() | term(), InitArg_or_Host::term() | <a href="inet.html#type-hostname">inet:hostname()</a>, Host_or_Port::<a href="inet.html#type-hostname">inet:hostname()</a> | <a href="inet.html#type-port_number">inet:port_number()</a>, Port_or_Opts::<a href="inet.html#type-port_number">inet:port_number()</a> | <a href="sockerl_connector_sup.html#type-start_options">sockerl_connector_sup:start_options()</a>) -> <a href="sockerl_connector_sup.html#type-start_return">sockerl_connector_sup:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket connection pool.</p> | ||
|
||
<h3 class="function"><a name="start_link_connector_pool-6">start_link_connector_pool/6</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_connector_pool(Name::<a href="sockerl_connector_sup.html#type-register_name">sockerl_connector_sup:register_name()</a>, Mod::module(), InitArg::term(), Host::<a href="inet.html#type-hostname">inet:hostname()</a>, Port::<a href="inet.html#type-port_number">inet:port_number()</a>, Opts::<a href="sockerl_connector_sup.html#type-start_options">sockerl_connector_sup:start_options()</a>) -> <a href="sockerl_connector_sup.html#type-start_return">sockerl_connector_sup:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket connection pool.</p> | ||
|
||
<h3 class="function"><a name="start_link_server-3">start_link_server/3</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_server(Mod::module(), InitArg::term(), Port::<a href="inet.html#type-port_number">inet:port_number()</a>) -> <a href="sockerl_server_sup.html#type-start_return">sockerl_server_sup:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket server.</p> | ||
|
||
<h3 class="function"><a name="start_link_server-4">start_link_server/4</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_server(Name_or_Mod::<a href="sockerl_server_sup.html#type-register_name">sockerl_server_sup:register_name()</a> | module(), Mod_or_InitArg::module() | term(), InitArg_or_Port::term() | <a href="inet.html#type-port_number">inet:port_number()</a>, Port_or_Opts::<a href="inet.html#type-port_number">inet:port_number()</a> | <a href="sockerl_server_sup.html#type-start_options">sockerl_server_sup:start_options()</a>) -> <a href="sockerl_server_sup.html#type-start_return">sockerl_server_sup:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket server.</p> | ||
|
||
<h3 class="function"><a name="start_link_server-5">start_link_server/5</a></h3> | ||
<div class="spec"> | ||
<p><tt>start_link_server(Name::<a href="sockerl_server_sup.html#type-register_name">sockerl_server_sup:register_name()</a>, Mod::module(), InitArg::term(), Port::<a href="inet.html#type-port_number">inet:port_number()</a>, Opts::<a href="sockerl_server_sup.html#type-start_options">sockerl_server_sup:start_options()</a>) -> <a href="sockerl_server_sup.html#type-start_return">sockerl_server_sup:start_return()</a></tt><br></p> | ||
</div><p> | ||
Starts and links a socket server.</p> | ||
|
||
<h3 class="function"><a name="stop_connector-1">stop_connector/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>stop_connector(Con::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>) -> ok</tt><br></p> | ||
</div><p> | ||
Stops connector.</p> | ||
|
||
<h3 class="function"><a name="stop_connector-2">stop_connector/2</a></h3> | ||
<div class="spec"> | ||
<p><tt>stop_connector(Con::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>, Reason::any()) -> ok</tt><br></p> | ||
</div><p> | ||
Stops connector with specific reason.</p> | ||
|
||
<h3 class="function"><a name="stop_pool-1">stop_pool/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>stop_pool(Pool::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>) -> ok</tt><br></p> | ||
</div><p> | ||
stops pool and all connections it has.</p> | ||
|
||
<h3 class="function"><a name="stop_pool-2">stop_pool/2</a></h3> | ||
<div class="spec"> | ||
<p><tt>stop_pool(Pool::<a href="sockerl_types.html#type-name">sockerl_types:name()</a>, Reason::any()) -> ok</tt><br></p> | ||
</div><p> | ||
stops pool and all connections it has with specific reason.</p> | ||
|
||
<h3 class="function"><a name="stop_server-1">stop_server/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>stop_server(Server::<a href="sockerl_server.html#type-server">sockerl_server:server()</a>) -> ok</tt><br></p> | ||
</div><p> | ||
stops server and all connections it has.</p> | ||
|
||
<h3 class="function"><a name="stop_server-2">stop_server/2</a></h3> | ||
<div class="spec"> | ||
<p><tt>stop_server(Server::<a href="sockerl_server.html#type-server">sockerl_server:server()</a>, Reason::any()) -> ok</tt><br></p> | ||
</div><p> | ||
stops server and all connections it has.</p> | ||
|
||
<h3 class="function"><a name="wakeup_acceptors-1">wakeup_acceptors/1</a></h3> | ||
<div class="spec"> | ||
<p><tt>wakeup_acceptors(Server::<a href="sockerl_server_sup.html#type-server">sockerl_server_sup:server()</a>) -> ok</tt><br></p> | ||
</div><p> | ||
Turns all server acceptors to accept mode.</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, Jul 3 2017, 18:47:54.</i></p> | ||
</body> | ||
</html> |
Oops, something went wrong.