[zeromq-dev] ZeroMQ File Server
paul at colomiets.name
Sat May 14 16:32:53 CEST 2011
On Sat, May 14, 2011 at 6:40 AM, Thomas S Hatch <thatch45 at gmail.com> 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:
> 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
* 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)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev