On Wed, Aug 18, 2010 at 3:00 PM, Pieter Hintjens <[email protected]> wrote:
> Hmm... making a second socket type might be neatest after all, these
> are two opposite ways to see and use pubsub.  How does something like
> this feel:
>
> socket = context.socket(zmq.SELECT)
> socket.connect("inproc://error")
> socket.setsockopt(zmq.WHERE, "fatal")
> socket.setsockopt(zmq.WHERE, "debug")
>
> vs.
>
> socket = context.socket(zmq.SUB)
> socket.connect(marketdatafeed)
> ...
> socket.setsockopt(zmq.SUBSCRIBE, topic)
> socket.setsockopt(zmq.UNSUBSCRIBE, topic)

Not sure if I like the names in the first example. SELECT feels wrong
to me in the same way as SUB — why am I getting stuff if I haven't
“selected” anything or “subscribed” to anything?
Maybe something like zmq.STREAM for the socket type and
zmq.SELECT/zmq.REJECT (if/when it gets done) for socket options?
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to