On Sat, May 14, 2011 at 8:32 AM, Paul Colomiets <[email protected]> wrote:
> > > On Sat, May 14, 2011 at 6:40 AM, Thomas S Hatch <[email protected]>wrote: > >> I have just posed a small, quick article on the back end required for a >> VERY simple file server in ZeroMQ, for those of you interested: >> >> http://red45.wordpress.com/2011/05/13/zeromq-file-server/ >> >> I am, of course, and as usual, open to suggestions! >> > > Adding to Martin's and Pieter's suggestions: > * you use isfile() which does stat() call anyway, so use getsize() instead > and allocate buffer all at once (as Martin said file is held in memory > anyway) > * you *must* check the path against limited set of directories to send > from, even if you will run server in fully controlled environment (and use > realpath() for checking) > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > Great! This is what I was hoping to hear! If the entire file is getting read into ram anyway, how would I go about making a file server that would send the files in chunks and not read the whole thing into ram? I think that you can see me intention here, but I gues I am still not entirely sure how to do it yet. And yes Pieter, I am very much interested in seeing your information on how to best make a zeroMQ file server!
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
