[zeromq-dev] zframe compatible w/zsock picture?
Luca Boccassi
luca.boccassi at gmail.com
Sat Mar 24 11:11:02 CET 2018
On Fri, 2018-03-23 at 22:25 +0000, Georger, Joseph wrote:
> Just a quick question, I was starting to write send & receive using
> zframes, but came across the “picture” concept in zsock. I was
> sending three zframes, using addmem to construct the zmsg: char *
> topic, uint32_t length in bytes, char * for msg.
>
> I wrote the receiver using pictures,
> zsock_receive(socket, “s4s”, &sz, &topic, &payload)
>
> topic came through, but sz was 0. Should this in theory work, can I
> receive a frame containing a uint32_t with the picture paradigm? Can
> I intermix a zmsg/zframe sender with a picture receiver (and vice
> versa)? The docs imply yes: “The picture is a string that defines the
> type of each frame.”
>
> Thanks,
> Joe
Yes, see selftest for an example:
https://github.com/zeromq/czmq#zsock---high-level-socket-api-that-hides-libzmq-contexts-and-sockets
--
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20180324/07c46638/attachment.sig>
More information about the zeromq-dev
mailing list