[zeromq-dev] querying what a SUB socket is subscribed to
Jon Dyte
jon at totient.co.uk
Tue Oct 25 12:47:13 CEST 2011
Gaspar
You cannot query a socket on what subscriptions it has.
you can use setsockopt to subscribe and unsubscribe.
Jon
Körtesi Gáspár wrote:
> Hello,
>
> is there a way to query what subscriptions a socket has? I'm using PyZMQ
> (2.1.10 with zmq 2.1.10), and I've tried getsockopt as suggested by the
> documentation, but I get the following error:
>
> >>> s.setsockopt(zmq.SUBSCRIBE, "foo")
> >>> s.getsockopt(zmq.SUBSCRIBE)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "socket.pyx", line 331, in zmq.core.socket.Socket.getsockopt
> (zmq/core/socket.c:3202)
> zmq.core.error.ZMQError: Invalid argument
>
> What am I doing wrong?
>
>
> Thanks,
> Gaspar
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
More information about the zeromq-dev
mailing list