<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.2">
<TITLE>[near-PATCH] speed optimisation and bugfix: do one memory allocation per packet instead of two</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Lucida Console">Hello,</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">Sorry, I don't have a patch utility handy to do this cleanly, but the changes are pretty localized. Also, I have made other changes that are not submitted here that would spoil the patch anyway.</FONT></P>

<P><FONT SIZE=2 FACE="Lucida Console">BTW, this also fixes a bug: packet-&gt;data was allocated with enet_malloc(), but freed with free(). Well, now, packet-&gt;data no longer exists :-)</FONT></P>

<P><FONT SIZE=2 FACE="Lucida Console">Apart from that, there is no functionnal change.</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">Enet.h:</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">typedef struct _ENetPacket</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">&nbsp;&nbsp; size_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; referenceCount;&nbsp; /**&lt; internal use only */</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">&nbsp;&nbsp; enet_uint32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**&lt; bitwise or of ENetPacketFlag constants */</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">-&nbsp; enet_uint8 *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**&lt; allocated data for packet */</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">&nbsp;&nbsp; size_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataLength;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**&lt; length of data */</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">} ENetPacket;</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">+ #define packet_data(_packet) ((enet_uint8 *)(((ENetPacket *)(_packet))+1))</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Lucida Console">- ENET_API int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enet_packet_resize&nbsp; (ENetPacket *packet, size_t dataLength );</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">+ ENET_API ENetPacket * enet_packet_resize&nbsp; (ENetPacket *packet, size_t dataLength );</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">Protocol.c:</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">Replace the 3 occurrences of &lt;some packet&gt; -&gt; data with packet_data(&lt;some packet&gt;)</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">Packet.c:</FONT>
<BR><FONT SIZE=2 FACE="Lucida Console">The easiest thing to do is to replace everything with:</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">################################ BEGIN ##############################</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/** </FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;@file&nbsp; packet.c</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;@brief ENet packet management functions</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">*/</FONT>
<BR><FONT COLOR="#808080" SIZE=1 FACE="Lucida Console">#include</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">&lt;string.h&gt;</FONT>
<BR><FONT COLOR="#808080" SIZE=1 FACE="Lucida Console">#define</FONT><FONT SIZE=1 FACE="Lucida Console"> ENET_BUILDING_LIB </FONT><FONT COLOR="#008000" SIZE=1 FACE="Lucida Console">1</FONT>
<BR><FONT COLOR="#808080" SIZE=1 FACE="Lucida Console">#include</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">&quot;enet/enet.h&quot;</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/** @defgroup Packet ENet packet functions </FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @{ </FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">*/</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/** Creates a packet that may be sent to a peer.</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @param dataContents initial contents of the packet's data; the packet's data will remain uninitialized if dataContents is NULL.</FONT></P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @param dataLength&nbsp;&nbsp; size of the data allocated for this packet</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @param flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags for this packet as described for the ENetPacket structure.</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @returns the packet on success, NULL on failure</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">*/</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">enet_packet_create </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">const</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">void</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT><FONT SIZE=1 FACE="Lucida Console"> data</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">,</FONT><FONT SIZE=1 FACE="Lucida Console"> size_t dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">,</FONT><FONT SIZE=1 FACE="Lucida Console"> enet_uint32 flags</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT><FONT SIZE=1 FACE="Lucida Console"> packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*)</FONT><FONT SIZE=1 FACE="Lucida Console"> enet_malloc </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">sizeof</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">+</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">);</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">if</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console"> packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">!=</FONT><FONT SIZE=1 FACE="Lucida Console"> NULL </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memcpy </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">packet_data</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">),</FONT><FONT SIZE=1 FACE="Lucida Console"> data</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">,</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">);</FONT>
</P>

<P><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> referenceCount </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#008000" SIZE=1 FACE="Lucida Console">0</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> flags </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> flags</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">}</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">return</FONT><FONT SIZE=1 FACE="Lucida Console"> packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">}</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/** Destroys the packet and deallocates its data.</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @param packet packet to be destroyed</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">*/</FONT>
<BR><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">void</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">enet_packet_destroy </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT><FONT SIZE=1 FACE="Lucida Console"> packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; enet_free </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">);</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">}</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/** Attempts to resize the data in the packet to length specified in the </FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; dataLength parameter </FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @param packet packet to resize</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @param dataLength new size for the packet data</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; @returns the new packet address on success, NULL on failure (length is unchanged)</FONT>
<BR><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">*/</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">enet_packet_resize </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT><FONT SIZE=1 FACE="Lucida Console"> packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">,</FONT><FONT SIZE=1 FACE="Lucida Console"> size_t dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*</FONT><FONT SIZE=1 FACE="Lucida Console"> newPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/* reducing length is faster done by leaving the block unchanged... */</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">if</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">dataLength </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">&lt;=</FONT><FONT SIZE=1 FACE="Lucida Console"> packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
</P>

<P><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">return</FONT><FONT SIZE=1 FACE="Lucida Console"> packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">}</FONT>
</P>

<P><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; newPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">*)</FONT><FONT SIZE=1 FACE="Lucida Console"> enet_malloc </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">sizeof</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">+</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">);</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">if</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console"> newPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">!=</FONT><FONT SIZE=1 FACE="Lucida Console"> NULL </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">{</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memcpy </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">newPacket</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">,</FONT><FONT SIZE=1 FACE="Lucida Console"> packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">,</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">sizeof</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">ENetPacket</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">)</FONT><FONT SIZE=1 FACE="Lucida Console"> </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">+</FONT><FONT SIZE=1 FACE="Lucida Console"> packet </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">);</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enet_free </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">(</FONT><FONT SIZE=1 FACE="Lucida Console">packet</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">);</FONT>
</P>

<P><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newPacket </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">-&gt;</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">=</FONT><FONT SIZE=1 FACE="Lucida Console"> dataLength</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">}</FONT>
<BR><FONT SIZE=1 FACE="Lucida Console">&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=1 FACE="Lucida Console">return</FONT><FONT SIZE=1 FACE="Lucida Console"> newPacket</FONT><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">;</FONT>
<BR><FONT COLOR="#FF0000" SIZE=1 FACE="Lucida Console">}</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=1 FACE="Lucida Console">/** @} */</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Console">################################ END ##############################</FONT>
<BR><FONT COLOR="#800000" SIZE=2 FACE="Lucida Console">__________________________________</FONT>
<BR><FONT COLOR="#800000" SIZE=2 FACE="Lucida Console">Benoit Germain</FONT>
<BR><A HREF="mailto:bgermain@ubisoft.fr"><U></U><U><FONT COLOR="#0000FF" SIZE=2 FACE="Lucida Console">mailto:bgermain@ubisoft.fr</FONT></U></A>
</P>

<P><FONT COLOR="#660000" SIZE=2 FACE="Lucida Console">Person who says it cannot be done should not interrupt person doing it.</FONT>
<BR><FONT COLOR="#660000" SIZE=2 FACE="Lucida Console">-- Chinese Proverb</FONT>
</P>

<P><FONT COLOR="#800000" SIZE=2 FACE="Lucida Console">People who think they're smart annoy those of us who are.</FONT>
<BR><FONT COLOR="#800000" SIZE=2 FACE="Lucida Console">-- double-U's Proverb ?</FONT>
<BR><FONT COLOR="#800000" SIZE=2 FACE="Lucida Console">__________________________________</FONT>
</P>

</BODY>
</HTML>