[zeromq-dev] Multicast and wlan0
Will Heger
will.heger at gmail.com
Fri Sep 7 16:21:26 CEST 2012
>From the original post, the test code I'm using (quoted below).
I have run this producer/consumer pair (different hosts) using the
following variations:
epgm://239.192.1.1:5000 # does not complain, does not deliver
epgm://wlan0;239.192.1.1:5000 # dies with "Assertion failed: rc ==
0" on a machine with a wireless iface
epgm://eth0;239.192.1.1:5000 # dies with "Assertion failed: rc ==
0" on a machine with a wired iface
epgm://192.168.2.1:5000 # sanity check non-multicast IP -
dies "Assertion failed: rc == 0"
For sanity, I ran a request/reply pair using:
tcp://192.168.2.1 # works fine
tcp://wlan0;192.168.2.1 # dies with "zmq.core.error.ZMQError: Invalid argument"
tcp://eth0;192.168.2.1 # dies with "zmq.core.error.ZMQError:
Invalid argument"
I do not know if the two issues, an inability to use the interface
prefix and failing to receive epgm are related, but they're posted
together here for completeness.
Is there a packet sniffing tool for Linux that is recommended for this
kind of thing? I'm not that versed in network debugging.
> # producer
> import zmq
> context = zmq.Context()
> socket = context.socket(zmq.PUB)
> socket.setsockopt(zmq.LINGER, 0) # discard unsent messages on close
> socket.connect('epgm://239.192.1.1:5000')
> while True:
> msg = raw_input('> ')
> if msg == 'quit':
> break
> else:
> socket.send(msg)
> socket.close()
>
> # consumer
> import zmq
> context = zmq.Context()
> socket = context.socket(zmq.SUB)
> socket.connect('epgm://239.192.1.1:5000')
> socket.setsockopt(zmq.SUBSCRIBE, 'test')
> socket.setsockopt(zmq.SUBSCRIBE, 'topic_1')
> while True:
>
> data = socket.recv()
> print data
More information about the zeromq-dev
mailing list