[ENet-discuss] File transfers w/ e-net

Chris Jurney jurney at gmail.com
Wed May 12 16:46:52 PDT 2010


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.

2010/5/12 Thorbjørn Lindeijer <bjorn at lindeijer.nl>

> On Wed, May 12, 2010 at 08:23, Mike Diehl <mdiehl at diehlnet.com> wrote:
> > The project that I'm working on will require the ability to move files
> to/from
> > the client and server.
> >
> > There seem to be two possible extremes here:
> >
> > 1.  I create one potentially large packet that contains ALL of the file's
> > content and send it over a reliable channel.  E-net would handle all of
> the
> > fragmentation and just "do the right thing" for me.  However, this would
> be a
> > tremendous memory hog.
> >
> > 2.  I keep a file handle open and send out a chunk of file each time
> through
> > the main loop.  Seems like this would make my code more complex.
> >
> > Is there any example code or advice anyone would like to offer?
>
> I don't think ENet is very suitable for this use-case, and I'd
> definitely expect the second option to work better. But did you
> consider transferring the files outside of ENet, using a more suitable
> protocol like for example HTTP? Just because your game uses ENet
> doesn't mean you have to use it for everything. :-)
>
> Regards,
> Bjørn
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20100512/3e0437f3/attachment.html>


More information about the ENet-discuss mailing list