PageRenderTime 30ms CodeModel.GetById 20ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/src/middleware/enet/docs/group__Packet.html

https://bitbucket.org/vivkin/gam3b00bs/
HTML | 156 lines | 148 code | 7 blank | 1 comment | 0 complexity | 0f1d4e259a7c2f56d5970bb509c39aa5 MD5 | raw file
  1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2<html xmlns="http://www.w3.org/1999/xhtml">
  3<head>
  4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5<title>enet: ENet packet functions</title>
  6<link href="tabs.css" rel="stylesheet" type="text/css"/>
  7<link href="doxygen.css" rel="stylesheet" type="text/css"/>
  8</head>
  9<body>
 10<!-- Generated by Doxygen 1.7.1 -->
 11<div class="navigation" id="top">
 12  <div class="tabs">
 13    <ul class="tablist">
 14      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
 15      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
 16      <li><a href="modules.html"><span>Modules</span></a></li>
 17      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
 18      <li><a href="files.html"><span>Files</span></a></li>
 19    </ul>
 20  </div>
 21</div>
 22<div class="header">
 23  <div class="summary">
 24<a href="#func-members">Functions</a>  </div>
 25  <div class="headertitle">
 26<h1>ENet packet functions</h1>  </div>
 27</div>
 28<div class="contents">
 29<table class="memberdecls">
 30<tr><td colspan="2"><h2><a name="func-members"></a>
 31Functions</h2></td></tr>
 32<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Packet.html#gaac61b251aebbf9f5e5e313eca51339ea">enet_packet_create</a> (const void *data, size_t dataLength, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> flags)</td></tr>
 33<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a packet that may be sent to a peer.  <a href="#gaac61b251aebbf9f5e5e313eca51339ea"></a><br/></td></tr>
 34<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Packet.html#gab58895376ee4ade8f4e13761a44ba263">enet_packet_destroy</a> (<a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet)</td></tr>
 35<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroys the packet and deallocates its data.  <a href="#gab58895376ee4ade8f4e13761a44ba263"></a><br/></td></tr>
 36<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Packet.html#ga0aee7f8c7e2d2c4b64f6d68d930155a8">enet_packet_resize</a> (<a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet, size_t dataLength)</td></tr>
 37<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to resize the data in the packet to length specified in the dataLength parameter.  <a href="#ga0aee7f8c7e2d2c4b64f6d68d930155a8"></a><br/></td></tr>
 38<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga015ce0307049901852c54dd2def532e2"></a><!-- doxytag: member="Packet::enet_crc32" ref="ga015ce0307049901852c54dd2def532e2" args="(const ENetBuffer *buffers, size_t bufferCount)" -->
 39<a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_crc32</b> (const <a class="el" href="structENetBuffer.html">ENetBuffer</a> *buffers, size_t bufferCount)</td></tr>
 40</table>
 41<hr/><h2>Function Documentation</h2>
 42<a class="anchor" id="gaac61b251aebbf9f5e5e313eca51339ea"></a><!-- doxytag: member="packet.c::enet_packet_create" ref="gaac61b251aebbf9f5e5e313eca51339ea" args="(const void *data, size_t dataLength, enet_uint32 flags)" -->
 43<div class="memitem">
 44<div class="memproto">
 45      <table class="memname">
 46        <tr>
 47          <td class="memname"><a class="el" href="struct__ENetPacket.html">ENetPacket</a>* enet_packet_create </td>
 48          <td>(</td>
 49          <td class="paramtype">const void *&nbsp;</td>
 50          <td class="paramname"> <em>data</em>, </td>
 51        </tr>
 52        <tr>
 53          <td class="paramkey"></td>
 54          <td></td>
 55          <td class="paramtype">size_t&nbsp;</td>
 56          <td class="paramname"> <em>dataLength</em>, </td>
 57        </tr>
 58        <tr>
 59          <td class="paramkey"></td>
 60          <td></td>
 61          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
 62          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
 63        </tr>
 64        <tr>
 65          <td></td>
 66          <td>)</td>
 67          <td></td><td></td><td></td>
 68        </tr>
 69      </table>
 70</div>
 71<div class="memdoc">
 72<dl><dt><b>Parameters:</b></dt><dd>
 73  <table border="0" cellspacing="2" cellpadding="0">
 74    <tr><td valign="top"></td><td valign="top"><em>dataContents</em>&nbsp;</td><td>initial contents of the packet's data; the packet's data will remain uninitialized if dataContents is NULL. </td></tr>
 75    <tr><td valign="top"></td><td valign="top"><em>dataLength</em>&nbsp;</td><td>size of the data allocated for this packet </td></tr>
 76    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>flags for this packet as described for the ENetPacket structure. </td></tr>
 77  </table>
 78  </dd>
 79</dl>
 80<dl class="return"><dt><b>Returns:</b></dt><dd>the packet on success, NULL on failure </dd></dl>
 81
 82<p>References <a class="el" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daa6ce462752c36aad22e68ebefac3df8c">ENET_PACKET_FLAG_NO_ALLOCATE</a>.</p>
 83
 84</div>
 85</div>
 86<a class="anchor" id="gab58895376ee4ade8f4e13761a44ba263"></a><!-- doxytag: member="packet.c::enet_packet_destroy" ref="gab58895376ee4ade8f4e13761a44ba263" args="(ENetPacket *packet)" -->
 87<div class="memitem">
 88<div class="memproto">
 89      <table class="memname">
 90        <tr>
 91          <td class="memname">void enet_packet_destroy </td>
 92          <td>(</td>
 93          <td class="paramtype"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td>
 94          <td class="paramname"> <em>packet</em></td>
 95          <td>&nbsp;)&nbsp;</td>
 96          <td></td>
 97        </tr>
 98      </table>
 99</div>
100<div class="memdoc">
101<dl><dt><b>Parameters:</b></dt><dd>
102  <table border="0" cellspacing="2" cellpadding="0">
103    <tr><td valign="top"></td><td valign="top"><em>packet</em>&nbsp;</td><td>packet to be destroyed </td></tr>
104  </table>
105  </dd>
106</dl>
107
108<p>References <a class="el" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daa6ce462752c36aad22e68ebefac3df8c">ENET_PACKET_FLAG_NO_ALLOCATE</a>.</p>
109
110<p>Referenced by <a class="el" href="group__host.html#ga5190a63f78eb0c15bd96cda44bf423c6">enet_host_broadcast()</a>.</p>
111
112</div>
113</div>
114<a class="anchor" id="ga0aee7f8c7e2d2c4b64f6d68d930155a8"></a><!-- doxytag: member="packet.c::enet_packet_resize" ref="ga0aee7f8c7e2d2c4b64f6d68d930155a8" args="(ENetPacket *packet, size_t dataLength)" -->
115<div class="memitem">
116<div class="memproto">
117      <table class="memname">
118        <tr>
119          <td class="memname">int enet_packet_resize </td>
120          <td>(</td>
121          <td class="paramtype"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td>
122          <td class="paramname"> <em>packet</em>, </td>
123        </tr>
124        <tr>
125          <td class="paramkey"></td>
126          <td></td>
127          <td class="paramtype">size_t&nbsp;</td>
128          <td class="paramname"> <em>dataLength</em></td><td>&nbsp;</td>
129        </tr>
130        <tr>
131          <td></td>
132          <td>)</td>
133          <td></td><td></td><td></td>
134        </tr>
135      </table>
136</div>
137<div class="memdoc">
138<dl><dt><b>Parameters:</b></dt><dd>
139  <table border="0" cellspacing="2" cellpadding="0">
140    <tr><td valign="top"></td><td valign="top"><em>packet</em>&nbsp;</td><td>packet to resize </td></tr>
141    <tr><td valign="top"></td><td valign="top"><em>dataLength</em>&nbsp;</td><td>new size for the packet data </td></tr>
142  </table>
143  </dd>
144</dl>
145<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure </dd></dl>
146
147<p>References <a class="el" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daa6ce462752c36aad22e68ebefac3df8c">ENET_PACKET_FLAG_NO_ALLOCATE</a>.</p>
148
149</div>
150</div>
151</div>
152<hr class="footer"/><address class="footer"><small>Generated on Wed Feb 9 2011 21:31:05 for enet by&nbsp;
153<a href="http://www.doxygen.org/index.html">
154<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
155</body>
156</html>