Packages
mysql_client
1.2.8
MySQL native client is written in Erlang and provides API that is very close to Connector/C library.
Current section
Files
Jump to
Current section
Files
doc/io_socket.html
<!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 io_socket</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 io_socket</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>The module is responsible for low level operation with socket.
<p>Copyright © 2010-2014 Alexei Krasnopolski</p>
<p><b>Version:</b> 1.2.8</p>
<p><b>Introduced in:</b> 2011-3-24</p>
<p><b>Authors:</b> Alexei Krasnopolski (<a href="mailto:krasnop@bellsouth.net"><tt>krasnop@bellsouth.net</tt></a>) [<em>web site:</em> <tt><a href="http://crasnopolski.com/" target="_top">http://crasnopolski.com/</a></tt>].</p>
<h2><a name="description">Description</a></h2>The module is responsible for low level operation with socket. The reading from socket includes
decompression (if compress mode is set) and parsing input data stream to MySQL logical packets.
The writing operation forms from data lists logical packets and compress them if compress mode.
<h2><a name="types">Data Types</a></h2>
<h3 class="typedecl"><a name="type-socket">socket()</a></h3>
<p><tt>socket() = port()</tt></p>
<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="#receive_data-2">receive_data/2</a></td><td>Retreives data from socket and forms it as a list of binary mySQL packets.</td></tr>
<tr><td valign="top"><a href="#send_single_packet-6">send_single_packet/6</a></td><td>Sends one single packet to socket output stream.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="receive_data-2">receive_data/2</a></h3>
<div class="spec">
<p><tt>receive_data(Socket::<a href="#type-socket">socket()</a>, Is_compressed::boolean()) -> [#packet{}] | #mysql_error{}</tt><br></p>
<p> </p>
</div><p>Retreives data from socket and forms it as a list of binary mySQL packets.
</p>
<h3 class="function"><a name="send_single_packet-6">send_single_packet/6</a></h3>
<div class="spec">
<p><tt>send_single_packet(Socket::<a href="#type-socket">socket()</a>, Packet_body::binary(), PacketSize::integer(), N::integer(), Is_multi_pack::boolean(), Is_compressed::boolean()) -> ok | #mysql_error{}</tt><br></p>
<p> </p>
</div><p>Sends one single packet to socket output stream. If the packet has huge length the function splites
the packet to chunks and processes these recursively.
</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</i></p>
</body>
</html>