On 01/19/2012 01:41 AM, Staffan Gimåker wrote:
> Do you have any opinions on how the public API for this should look?
> I've started implementing this stuff so it'd be nice to know sooner
> rather than later :D
>
> I'm thinking along the lines of just adding more socketops for this, e.g.:
>
>    zmq_setsockopt(sock, ZMQ_SUBSCRIBE_EXACT, topic, topic_len);
>
> Any other suggestions?

Taking backward compatibility into account, I would propose following API:

int filter = ZMQ_FILTER_EXACT;
zmq_setsockopt (s, ZMQ_FILTER, &filter, sizeof (filter));
zmq_setsockopt (s, ZMQ_SUBSCRIBE, "ABC", 3);

The default value for ZMQ_FILTER option would be ZMQ_FILTER_PREFIX.

Thoughts?
Martin
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to