ZeroMQ does support both :
both the UDP://
and {PGM|EPGM}://
transport-classes
Examples of { PGM | EPGM }
:
// Connecting to the multicast address 239.192.1.1, port 5555,
// using the first Ethernet network interface on Linux
// and the Encapsulated PGM protocol
rc = zmq_connect( socket, "epgm://eth0;239.192.1.1:5555" );
assert ( rc == 0 and "ASSERT FAILED: epgm://eth0;239.192.1.1:5555 ............. " );
// Connecting to the multicast address 239.192.1.1, port 5555,
// using the network interface with the address 192.168.1.1
// and the standard PGM protocol
rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555" );
assert ( rc == 0 and "ASSERT FAILED: pgm://192.168.1.1;239.192.1.1:5555 ........" );
The pgm://
and epgm://
transports can only be used with the ZMQ_PUB
and ZMQ_SUB
socket types.
UDP://
transport can only be used with the ZMQ_RADIO
and ZMQ_DISH
socket types.
Examples of UDP .bind()
, .connect()
-s are analogous :
// Unicast - UDP port 5555 on all available interfaces
rc = zmq_bind( dish, "udp://*:5555" );
assert ( rc == 0 and "ASSERT FAILED: udp://*:5555 ............. " );
// Unicast - UDP port 5555 on the local loop-back interface
rc = zmq_bind( dish, "udp://127.0.0.1:5555" );
assert ( rc == 0 and "ASSERT FAILED: udp://127.0.0.1:5555 ............. " );
// Unicast - UDP port 5555 on interface eth1
rc = zmq_bind( dish, "udp://eth1:5555" );
assert ( rc == 0 and "ASSERT FAILED: udp://eth1:5555 ............. " );
// Multicast - UDP port 5555 on a Multicast address
rc = zmq_bind( dish, "udp://239.0.0.1:5555" );
assert ( rc == 0 and "ASSERT FAILED: udp://239.0.0.1:5555 ............. " );
// Same as above but joining only on interface eth0
rc = zmq_bind( dish, "udp://eth0;239.0.0.1:5555" );
assert ( rc == 0 and "ASSERT FAILED: udp://eth0;239.0.0.1:5555 ............. " );
// Same as above using IPv6 multicast
rc = zmq_bind( dish, "udp://eth0;[ff02::1]:5555" );
assert ( rc == 0 and "ASSERT FAILED: udp://eth0;[ff02::1]:5555 ............. " );
The Best Next Step :
Now review the scope and the state of the pyzmq-19.0.0
implementation of the native-API ( be it 4.3.2+ or older ).