Open
Description
Please use this template for reporting suspected bugs or requests for help.
Issue description
I attempted to use Radio Dish in ZeroMQ to send messages using UDP, but the client isn't receiving anything. Do you have any ideas on what might be wrong? I'm trying to send messages from Radio to Dish.
Environment
- libzmq version (commit hash if unreleased): 4.3.4
- OS: Linux
Minimal test code / Steps to reproduce the issue
Radio:
#define ZMQ_BUILD_DRAFT_API
#include <zmq.hpp>
#include <iostream>
#include <chrono>
#include <thread>
int main() {
using namespace std::chrono_literals;
zmq::context_t context{1};
zmq::socket_t socket{context, zmq::socket_type::radio};
socket.connect("udp://127.0.0.1:5555");
const std::string data{"Hello"};
while (true) {
// Send the reply to the client
socket.send(zmq::buffer(data), zmq::send_flags::none);
// Simulate work
std::this_thread::sleep_for(1s);
}
return 0;
}
Dish:
#define ZMQ_BUILD_DRAFT_API
#include <zmq.hpp>
#include <iostream>
int main() {
// Initialize the ZeroMQ context with a single IO thread
zmq::context_t context{1};
zmq::socket_t socket{context, zmq::socket_type::dish};
socket.bind("udp://127.0.0.1:5555");
while (true) {
zmq::message_t reply{};
(void)socket.recv(reply, zmq::recv_flags::none);
std::cout << "Received " << reply.to_string();
}
return 0;
}
Metadata
Metadata
Assignees
Labels
No labels