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"><<a href="mailto:bjorn@lindeijer.nl">bjorn@lindeijer.nl</a>></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 <<a href="mailto:mdiehl@diehlnet.com">mdiehl@diehlnet.com</a>> wrote:<br>
> The project that I'm working on will require the ability to move files to/from<br>
> the client and server.<br>
><br>
> There seem to be two possible extremes here:<br>
><br>
> 1. I create one potentially large packet that contains ALL of the file's<br>
> content and send it over a reliable channel. E-net would handle all of the<br>
> fragmentation and just "do the right thing" for me. However, this would be a<br>
> tremendous memory hog.<br>
><br>
> 2. I keep a file handle open and send out a chunk of file each time through<br>
> the main loop. Seems like this would make my code more complex.<br>
><br>
> Is there any example code or advice anyone would like to offer?<br>
<br>
</div>I don't think ENet is very suitable for this use-case, and I'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'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>