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 <[email protected]> > On Wed, May 12, 2010 at 08:23, Mike Diehl <[email protected]> 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 > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss >
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
