Agreed.  You might look for something better suitted to transferring files than eNet like the File Transfer Protocol.  TCP has had a lot of effort poured into it to solve exactly this sort of problem.<br><br><div class="gmail_quote">
2010/5/12 Thorbjørn Lindeijer <span dir="ltr">&lt;<a href="mailto:bjorn@lindeijer.nl">bjorn@lindeijer.nl</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, May 12, 2010 at 08:23, Mike Diehl &lt;<a href="mailto:mdiehl@diehlnet.com">mdiehl@diehlnet.com</a>&gt; wrote:<br>
&gt; The project that I&#39;m working on will require the ability to move files to/from<br>
&gt; the client and server.<br>
&gt;<br>
&gt; There seem to be two possible extremes here:<br>
&gt;<br>
&gt; 1.  I create one potentially large packet that contains ALL of the file&#39;s<br>
&gt; content and send it over a reliable channel.  E-net would handle all of the<br>
&gt; fragmentation and just &quot;do the right thing&quot; for me.  However, this would be a<br>
&gt; tremendous memory hog.<br>
&gt;<br>
&gt; 2.  I keep a file handle open and send out a chunk of file each time through<br>
&gt; the main loop.  Seems like this would make my code more complex.<br>
&gt;<br>
&gt; Is there any example code or advice anyone would like to offer?<br>
<br>
</div>I don&#39;t think ENet is very suitable for this use-case, and I&#39;d<br>
definitely expect the second option to work better. But did you<br>
consider transferring the files outside of ENet, using a more suitable<br>
protocol like for example HTTP? Just because your game uses ENet<br>
doesn&#39;t mean you have to use it for everything. :-)<br>
<br>
Regards,<br>
Bjørn<br>
<div><div></div><div class="h5">_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
</div></div></blockquote></div><br>