subscribe_socket.setsockopt_string(zmq.SUBSCRIBE, six.u(CONTROL_CHANNEL)) subscribe_socket.setsockopt_string(zmq.SUBSCRIBE, six.u(ADMIN_CHANNEL))deflisten_socket():# wrap sub socket into ZeroMQ stream and set its on_recv callbackself.sub_stream = ZMQStream(subscribe_socket) self.sub_stream.on...
socket.Connect("tcp://localhost:5558") socket.SetSockOptString(zmq.SUBSCRIBE,"")for{// block here, waiting for inbound requestsmsg, _ := socket.Recv(0)iflen(msg) >0{ parts := strings.Split(string(msg),"\n\n") process(parts[0]) } } } 开发者ID:araddon,项目名称:sentiment, Listen...
cupd_in.setsockopt(zmq.SUBSCRIBE, '') File "socket.pyx", line 310, in zmq.backend.cython.socket.Socket.set (zmq/backend/cython/socket.c:3219) TypeError: unicode not allowed, use setsockopt_string 2018-04-18 08:56:31,202 [salt.utils.process:754 ][ERROR ][13954] An un-handled exceptio...
subscribe_socket.setsockopt_string(zmq.SUBSCRIBE, six.u(CONTROL_CHANNEL)) subscribe_socket.setsockopt_string(zmq.SUBSCRIBE, six.u(ADMIN_CHANNEL))deflisten_socket():# wrap sub socket into ZeroMQ stream and set its on_recv callbackself.sub_stream = ZMQStream(subscribe_socket) self.sub_stream...