[zeromq-dev] How to open a socket on a real file ?

Pieter Hintjens ph at imatix.com
Wed Jun 5 15:51:48 CEST 2013


On Wed, Jun 5, 2013 at 3:29 PM, Laurent Alebarde <l.alebarde at free.fr> wrote:

> In the time between, I had a look at zguide/examples/C/fileio[1-3].c , but
> they don't use polling.

We do not poll for reading a file; this is for sockets only. When you
want to read X bytes from a file, you just call the read/fread
function.

> filemq is not easy for me to study. As you describe it as a PUB/SUB, except
> the integrity check with the SHA digest and the SASL security, I have no
> mean to check the delivery. Is it correct ?

It uses a PUB SUB model but over ROUTER-DEALER. It doesn't confirm
chunks but when a client (re)connects it tells the server what files
it already has, and the server will send any changes (including failed
files).

> At this point, I am making a mix between zguide/examples/C/fileio1.c and the
> lazy pirate.

Sure... it's wise to start by writing small examples and seeing how they work.

-Pieter



More information about the zeromq-dev mailing list