zeromq

ZMQError: Cannot assign requested address

独自空忆成欢 提交于 2019-12-04 12:49:59
I'm using zeromq to develop a dynamic application which operate like upnp protocol( autoconfiguration and auto-discovery of equipment on a living room). To do it so, i use zeromq to distribute messages, my problem is that when i create a socket and binding on a adress "169.254.1.0 through 169.254.254.255" , I receive a error messages like this: ZMQError: Cannot assign requested address . I've tried to figure out why by changing the address by local adress (127.0.0.1),and it's works !!. The problem is that i'm implementing autoip, it's means that i'm oblliged to use the adresse on range 169.254

Cross-compiling ZeroMQ to ARM for use in a MonoTouch iPhone app configure settings

放肆的年华 提交于 2019-12-04 12:31:28
问题 I'm attempting to use the ZeroMQ library in an iPhone app developed in C# using MonoTouch. I've solved almost all of the problems, but have fallen at the last hurdle. I'm using ZeroMQ 2.1.10, and the C# CLR binding/wrapper, and developing in Mac OS X 10.6.8. Here's the story so far: I first attempted to use ZeroMq in a simple Mono C# Console app. I built ZeroMQ with ./configure , then make and sudo make install , which installs shared library /usr/local/lib/libzmq.dylib . The ZeroMq C#

How to use ZeroMQ in an GTK/QT/Clutter application?

和自甴很熟 提交于 2019-12-04 12:17:49
问题 In gtk applications all execution is taking place inside the gtk_main function. And other graphical frame works have similar event loops like app.exec for QT and clutter_main for Clutter. However ZeroMQ is based on the assumption that there is an while (1) ... loop that it is inserted into (see for instance here for examples). How do you combine those two execution strategies? I am currently wanting to use zeromq in a clutter application written in C, so I would of course like direct answers

How can I clean up properly when recv is blocking?

♀尐吖头ヾ 提交于 2019-12-04 10:22:15
Consider the example code below (I typed it up quickly as an example, if there are errors it doesn't matter - I'm interested in the theory). bool shutDown = false; //global int main() { CreateThread(NULL, 0, &MessengerLoop, NULL, 0, NULL); //do other programmy stuff... } DWORD WINAPI MessengerLoop( LPVOID lpParam ) { zmq::context_t context(1); zmq::socket_t socket (context, ZMQ_SUB); socket.connect("tcp://localhost:5556"); socket.setsockopt(ZMQ_SUBSCRIBE, "10001 ", 6); while(!shutDown) { zmq_msg_t getMessage; zmq_msg_init(&getMessage); zmq_msg_recv (&getMessage, socket, 0); //This line will

Are there any Python 2.7 alternatives to ZeroMQ that are released under the BSD or MIT license?

梦想的初衷 提交于 2019-12-04 10:16:40
I am seeking Python 2.7 alternatives to ZeroMQ that are released under the BSD or MIT license. I am looking for something that supports request-reply and pub-sub messaging patterns. I can serialize the data myself if necessary. I found Twisted from Twisted Matrix Labs but it appears to require a blocking event loop, i.e. reactor.run(). I need a library that will run in the background and let my application check messages upon certain events. Are there any other alternatives? Give nanomsg , a ZeroMQ younger sister, a try - same father, same beauty Yes, it is licensed under MIT /X11 license. Yes

How to send OpenCV video footage over ZeroMQ sockets?

无人久伴 提交于 2019-12-04 09:01:20
问题 I've got a simple webcam which I read out using OpenCV and I'm now trying to send this video footage to a different (Python) program using ZeroMQ. So I've got the following simple script to read out the webcam and send it using a ZeroMQ socket: import cv2 import os import zmq import base64 context = zmq.Context() footage_socket = context.socket(zmq.PUB) footage_socket.connect('tcp://localhost:5555') # init the camera camera = cv2.VideoCapture(0) while True: try: (grabbed, frame) = camera.read

ZeroMQ PUB socket buffers all my out going data when it is connecting

被刻印的时光 ゝ 提交于 2019-12-04 07:59:50
问题 I noticed that a zeromq PUB socket will buffers all outgoing data if it is connecting, for example import zmq import time context = zmq.Context() # create a PUB socket pub = context.socket (zmq.PUB) pub.connect("tcp://127.0.0.1:5566") # push some message before connected # they should be dropped for i in range(5): pub.send('a message should not be dropped') time.sleep(1) # create a SUB socket sub = context.socket (zmq.SUB) sub.bind("tcp://127.0.0.1:5566") sub.setsockopt(zmq.SUBSCRIBE, "")

ZMQ: No subscription message on XPUB socket for multiple subscribers (Last Value Caching pattern)

旧街凉风 提交于 2019-12-04 05:33:09
I implemented the Last Value Caching (LVC) example of ZMQ ( http://zguide.zeromq.org/php:chapter5#Last-Value-Caching ), but can't get a 2nd subscriber to register at the backend. The first time a subscriber comes on board, the event[0] == b'\x01' condition is met and the cached value is sent, but the second subscriber (same topic) doesn't even register ( if backend in events: is never true). Everything else works fine. Data gets passed from the publisher to the subscribers (all). What could be the reason for this? Is the way the backend is connected correct? Is this pattern only supposed to

There is an example of Spyne client?

試著忘記壹切 提交于 2019-12-04 05:26:03
I'm trying to use spyne ( http://spyne.io ) in my server with ZeroMQ and MsgPack. I've followed the examples to program the server side, but i can't find any example that helps me to know how to program the client side. I've found the class spyne.client.zeromq.ZeroMQClient , but I don't know what it's supposed to be the 'app' parameter of its constructor. Thank you in advance! Edit: The (simplified) server-side code: from spyne.application import Application from spyne.protocol.msgpack import MessagePackRpc from spyne.server.zeromq import ZeroMQServer from spyne.service import ServiceBase from

ZeroMQ doesn't spot libsodium

穿精又带淫゛_ 提交于 2019-12-04 05:24:36
I'm hoping to get the CurveCP functionality working within ZeroMQ ØMQ. I'm using CentOS as the underlying OS. After downloading and running ZeroMQ, I've done the usual ./configure , make and sudo make install . Then running make check returned many test passes, but stated: libsodium not installed, skipping CURVE test So sudo yum install libsodium and sudo ldconfig , then make clean , and the commands above. But next time I ran the make check , the CURVE test is skipped, again reporting no libsodium. Looking at the tests, I see test_security_curve.cpp has #ifndef HAVE_LIBSODIUM and that