Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/enet-1.1/docs/html/group__Packet.html @ 13

Last change on this file since 13 was 13, checked in by landauf, 17 years ago

added enet

File size: 7.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>enet: ENet packet functions</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.1 -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="modules.html"><span>Modules</span></a></li>
12    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
13    <li><a href="files.html"><span>Files</span></a></li>
14    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
15  </ul></div>
16<h1>ENet packet functions</h1>
17<p>
18<table border="0" cellpadding="0" cellspacing="0">
19<tr><td></td></tr>
20<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
21<tr><td class="memItemLeft" nowrap 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#gac61b251aebbf9f5e5e313eca51339ea">enet_packet_create</a> (const void *data, size_t dataLength, <a class="el" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> flags)</td></tr>
22
23<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a packet that may be sent to a peer.  <a href="#gac61b251aebbf9f5e5e313eca51339ea"></a><br></td></tr>
24<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Packet.html#gb58895376ee4ade8f4e13761a44ba263">enet_packet_destroy</a> (<a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet)</td></tr>
25
26<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroys the packet and deallocates its data.  <a href="#gb58895376ee4ade8f4e13761a44ba263"></a><br></td></tr>
27<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Packet.html#g0aee7f8c7e2d2c4b64f6d68d930155a8">enet_packet_resize</a> (<a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet, size_t dataLength)</td></tr>
28
29<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="#g0aee7f8c7e2d2c4b64f6d68d930155a8"></a><br></td></tr>
30<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g015ce0307049901852c54dd2def532e2"></a><!-- doxytag: member="Packet::enet_crc32" ref="g015ce0307049901852c54dd2def532e2" args="(const ENetBuffer *buffers, size_t bufferCount)" -->
31<a class="el" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_crc32</b> (const ENetBuffer *buffers, size_t bufferCount)</td></tr>
32
33</table>
34<hr><h2>Function Documentation</h2>
35<a class="anchor" name="gac61b251aebbf9f5e5e313eca51339ea"></a><!-- doxytag: member="packet.c::enet_packet_create" ref="gac61b251aebbf9f5e5e313eca51339ea" args="(const void *data, size_t dataLength, enet_uint32 flags)" -->
36<div class="memitem">
37<div class="memproto">
38      <table class="memname">
39        <tr>
40          <td class="memname"><a class="el" href="struct__ENetPacket.html">ENetPacket</a>* enet_packet_create           </td>
41          <td>(</td>
42          <td class="paramtype">const void *&nbsp;</td>
43          <td class="paramname"> <em>data</em>, </td>
44        </tr>
45        <tr>
46          <td class="paramkey"></td>
47          <td></td>
48          <td class="paramtype">size_t&nbsp;</td>
49          <td class="paramname"> <em>dataLength</em>, </td>
50        </tr>
51        <tr>
52          <td class="paramkey"></td>
53          <td></td>
54          <td class="paramtype"><a class="el" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
55          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
56        </tr>
57        <tr>
58          <td></td>
59          <td>)</td>
60          <td></td><td></td><td width="100%"></td>
61        </tr>
62      </table>
63</div>
64<div class="memdoc">
65
66<p>
67<dl compact><dt><b>Parameters:</b></dt><dd>
68  <table border="0" cellspacing="2" cellpadding="0">
69    <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>
70    <tr><td valign="top"></td><td valign="top"><em>dataLength</em>&nbsp;</td><td>size of the data allocated for this packet </td></tr>
71    <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>
72  </table>
73</dl>
74<dl class="return" compact><dt><b>Returns:</b></dt><dd>the packet on success, NULL on failure </dd></dl>
75
76</div>
77</div><p>
78<a class="anchor" name="gb58895376ee4ade8f4e13761a44ba263"></a><!-- doxytag: member="packet.c::enet_packet_destroy" ref="gb58895376ee4ade8f4e13761a44ba263" args="(ENetPacket *packet)" -->
79<div class="memitem">
80<div class="memproto">
81      <table class="memname">
82        <tr>
83          <td class="memname">void enet_packet_destroy           </td>
84          <td>(</td>
85          <td class="paramtype"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td>
86          <td class="paramname"> <em>packet</em>          </td>
87          <td>&nbsp;)&nbsp;</td>
88          <td width="100%"></td>
89        </tr>
90      </table>
91</div>
92<div class="memdoc">
93
94<p>
95<dl compact><dt><b>Parameters:</b></dt><dd>
96  <table border="0" cellspacing="2" cellpadding="0">
97    <tr><td valign="top"></td><td valign="top"><em>packet</em>&nbsp;</td><td>packet to be destroyed </td></tr>
98  </table>
99</dl>
100
101</div>
102</div><p>
103<a class="anchor" name="g0aee7f8c7e2d2c4b64f6d68d930155a8"></a><!-- doxytag: member="packet.c::enet_packet_resize" ref="g0aee7f8c7e2d2c4b64f6d68d930155a8" args="(ENetPacket *packet, size_t dataLength)" -->
104<div class="memitem">
105<div class="memproto">
106      <table class="memname">
107        <tr>
108          <td class="memname">int enet_packet_resize           </td>
109          <td>(</td>
110          <td class="paramtype"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td>
111          <td class="paramname"> <em>packet</em>, </td>
112        </tr>
113        <tr>
114          <td class="paramkey"></td>
115          <td></td>
116          <td class="paramtype">size_t&nbsp;</td>
117          <td class="paramname"> <em>dataLength</em></td><td>&nbsp;</td>
118        </tr>
119        <tr>
120          <td></td>
121          <td>)</td>
122          <td></td><td></td><td width="100%"></td>
123        </tr>
124      </table>
125</div>
126<div class="memdoc">
127
128<p>
129<dl compact><dt><b>Parameters:</b></dt><dd>
130  <table border="0" cellspacing="2" cellpadding="0">
131    <tr><td valign="top"></td><td valign="top"><em>packet</em>&nbsp;</td><td>packet to resize </td></tr>
132    <tr><td valign="top"></td><td valign="top"><em>dataLength</em>&nbsp;</td><td>new size for the packet data </td></tr>
133  </table>
134</dl>
135<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure </dd></dl>
136
137</div>
138</div><p>
139<hr size="1"><address style="align: right;"><small>Generated on Wed Jun 6 14:33:50 2007 for enet by&nbsp;
140<a href="http://www.doxygen.org/index.html">
141<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
142</body>
143</html>
Note: See TracBrowser for help on using the repository browser.