zeromq

Send data from browser-side to zeromq node.js client server

微笑、不失礼 提交于 2021-02-08 11:45:25
问题 I have a capture.js file included as a script in index.html which capture image on click via webcam. I need to send the base64URL of the captured image in zeromq client server (TCP client) written in node js so that I can connect send it later to a python zeromq server(TCP server). I have tried a lot of way and searched a lot for the weeks, there is no CDN link for zeromq and couldn't be able to compile it and also the variable shows undefined in client.js . I will really appreciate if any

ZeroMQ (cppzmq) subscriber with filters which start with the same string

♀尐吖头ヾ 提交于 2021-02-08 10:30:51
问题 I'm using two topics in my sample publisher. Both start with the same string. When I filter the message in a subscriber using only one of the two topics, the subscriber receives both topics If I use two different topics, it works My sample publisher try (ZContext context = new ZContext()) { final ZMQ.Socket socket = context.createSocket(SocketType.PUB); socket.bind("tcp://*:5555"); int i = 0; while (!Thread.currentThread().isInterrupted() && !stopped) { logger.debug("sending C1 message");

pyzmq REQ/REP with asyncio await for variable

好久不见. 提交于 2021-02-08 09:12:20
问题 I'm playing for the first time with asyncio in python and trying to combine it with ZMQ. Basically my issue is that I have a REP/REQ system, in an async def with a function I need to await. how the value is not updated. Here's a snippet of the code to illustrate that: #Declaring the zmq context context = zmq_asyncio.Context() REP_server_django = context.socket(zmq.REP) REP_server_django.bind("tcp://*:5558") I send this object to a class and get it back in this function async def readsonar

Why is ZeroMQ poller not receiving messages (python)?

孤人 提交于 2021-02-08 08:24:47
问题 I'm trying to use the ZeroMQ Poller() functionality with two sockets in python: import zmq # Prepare our context and sockets context = zmq.Context() receiver = context.socket(zmq.DEALER) receiver.connect("ipc:///tmp/interface-transducer") subscriber = context.socket(zmq.SUB) subscriber.bind("ipc:///tmp/fast-service") subscriber.setsockopt(zmq.SUBSCRIBE, b"10001") # Initialize poll set poller = zmq.Poller() poller.register(receiver, zmq.POLLIN) poller.register(subscriber, zmq.POLLIN) # Process

Build zeromq on Windows 10 with CMake

∥☆過路亽.° 提交于 2021-02-08 03:45:28
问题 In the past I’ve used the Visual Studio solution files to build zeromq (libzmq) on Windows. I just noticed that the Visual Studio solutions have been deprecated because they are too difficult to maintain. The alternative is to use CMake; trouble is I’ve no experience of how to invoke the build this way. Is anyone please able to demonstrate the necessary commands, step-by-step? I’d like to achieve 32 & 64bit libzmq binaries using libsodium and compiled with VS2015 on Windows 10. (I’ve

Why a ZeroMQ example does not work?

浪子不回头ぞ 提交于 2021-02-08 03:44:35
问题 I am new in Python/ ZeroMQ, so show forbearance if it is an easy question. I try to run some examples, but it does not work really good. Here is the hwserver/hwclient example of the ZeroMQ-Guide: SERVER # Hello World server in Python # Binds REP socket to tcp://*:5555 # Expects b"Hello" from client, replies with b"World" # import time import zmq context = zmq.Context() socket = context.socket(zmq.REP) socket.bind("tcp://*:5555") while True: message = socket.recv() # Wait for next request from

ZeroMQ: How to prioritise sockets in a .poll() method?

落花浮王杯 提交于 2021-02-02 08:56:49
问题 Imagine the following code: import threading, zmq, time context = zmq.Context() receivers = [] poller = zmq.Poller() def thread_fn(number: int): sender = context.socket(zmq.PUSH) sender.connect("tcp://localhost:%d" % (6666 + number)) for i in range(10): sender.send_string("message from thread %d" % number) for i in range(3): new_receiver = context.socket(zmq.PULL) new_receiver.bind("tcp://*:%d" % (6666 + i)) poller.register(new_receiver, zmq.POLLIN) receivers.append(new_receiver) threading

Swift memcpy doesn't have any effect when used with ZMQ zmq_msg_data

╄→尐↘猪︶ㄣ 提交于 2021-01-29 20:31:11
问题 I've been trying to write a libzmq wrapper for Swift by building off of an existing wrapper called SwiftyZeroMQ. However, for our purposes, we require the usage of raw UDP which means we need to use ZeroMQ's Radio/Dish draft method. I've been able to successfully write a wrapper for receiving data via the Dish socket but I'm now trying to write a wrapper for sending data via the Radio socket. There doesn't seem to be any stuff online regarding how to write a function to send data via the

ZMQ : how does a router identify a dealer

坚强是说给别人听的谎言 提交于 2021-01-03 07:13:51
问题 I'm using the ZMQ pattern dealer/router. In my project, a router is an agent manager and a dealer is an agent. So I have many dealers and only one router. Each dealer can send its own request to the router and wait for the reply. The router listens to one port so it must be able to identify the routers. I know that we can use zmq_setsockopt for the dealer to give its an unique id. And if the dealer sends a request to the router, the router will receive its unique id and its request. Imagine

ZMQ : how does a router identify a dealer

冷暖自知 提交于 2021-01-03 07:11:47
问题 I'm using the ZMQ pattern dealer/router. In my project, a router is an agent manager and a dealer is an agent. So I have many dealers and only one router. Each dealer can send its own request to the router and wait for the reply. The router listens to one port so it must be able to identify the routers. I know that we can use zmq_setsockopt for the dealer to give its an unique id. And if the dealer sends a request to the router, the router will receive its unique id and its request. Imagine