How to use ZeroMQ for raw UDP?
Asked Answered
C

2

11

I have a client, whose code I can't change -- but I'd like to (re)write using ZeroMQ sockets.

The clients use both raw TCP and raw UDP sockets.

I know I can use ZMQ_ROUTER_RAW for raw TCP sockets, but what about for raw UDP datastreams?

Circumnavigate answered 23/5, 2014 at 9:8 Comment(5)
zmq has no UDP support.Plunder
That's what I was afraid of. Thanks.Circumnavigate
Does that mean you can only use pgm/epgm ? There's no way to set up a socket with upd://XXX:123 like you would with TCP ?Volleyball
api.zeromq.org/master:zmq-udpAbamp
may be useful: https://mcmap.net/q/1016401/-what-do-i-need-to-do-to-get-zmq_radio-zmq_dish-to-work-properly/1052261Abamp
P
6

UDP Support for ZMQ is now documented here: http://api.zeromq.org/master:zmq-udp

Pyzmq version 18 has it as well, stating: "Protocols supported include tcp, udp, pgm, epgm, inproc and ipc." That said, my experimentation with Python hasn't found a solution that works yet. I get "protocol is not compatible with socket type" errors.

Plautus answered 10/12, 2019 at 17:0 Comment(0)
B
11

Support for UDP in ZeroMQ is brand new. The documentation for the new socket types (Radio/Dish) was just pushed to the GitHub repository a few days ago. As of right now, though, it still looks like there's no raw UDP support, but perhaps it will stem out of this new functionality.

I'd recommend commenting on the existing thread about adding UDP support: https://github.com/zeromq/libzmq/issues/807 .

Bigelow answered 3/5, 2016 at 19:30 Comment(3)
Glad you have mentioned this, Hank. Besides somdoron's ( he is active on S/O too ) work on UDP in RADIO/DISH there is a general notice in ZeroMQ Feature List: "Since version 4.2, libzmq supports UDP in Unicast and Multicast modes."Goby
3 years on this answer is no longer relevant.Longoria
Clicking through to the github issue #807 link, comment from April 2016: "Since version 4.2, libzmq also has UDP support in unicast and multicast modes."Plautus
P
6

UDP Support for ZMQ is now documented here: http://api.zeromq.org/master:zmq-udp

Pyzmq version 18 has it as well, stating: "Protocols supported include tcp, udp, pgm, epgm, inproc and ipc." That said, my experimentation with Python hasn't found a solution that works yet. I get "protocol is not compatible with socket type" errors.

Plautus answered 10/12, 2019 at 17:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.