[zeromq-dev] How do I derive a zactor in CZMQ?

Pieter Hintjens ph at imatix.com
Thu Aug 14 13:39:15 CEST 2014


On Thu, Aug 14, 2014 at 12:56 PM, Goswin von Brederlow
<goswin-v-b at web.de> wrote:

> This works because the low-level code knows the magics for zsock and
> zactor and will extract (recursively) the underlying zmq socket.

Yes. Now, you don't extend zactor. You use it as an API factory (if
that's the right term).

To create context per actor instance (which is your question, I
think), you define a separate struct internally to the actor source;
see zyre.c and zyre_node_actor as example.

No virtual functions, no base classes, no inheritance. This isn't C++,
it's C with slightly clever APIs.

-Pieter



More information about the zeromq-dev mailing list