[zeromq-dev] epgm / pgm / auto discovery in C++ on Windows and VS2013

Dorvin dorvin at tlen.pl
Thu Nov 27 14:24:17 CET 2014

W dniu 2014-11-27 11:31, James Chapman pisze:
> I looked at the following example from the user guide:
> http://zguide.zeromq.org/cpp:wuproxy and tried to implement a similar
> example. Obviously I'm still doing something wrong because I get
> exceptions thrown when trying to bind on the publisher and an
> exception thrown when trying to connect on the subscriber.
I tried to run epgm with pre-c++11 and 0MQ 4.0.4 and it didn't throw any 
exception. Try to provide address explicitly and not with c_str.

I wasn't able to make it pass messages, though. I haven't used pgm/epgm 
on windows so you'll probably have to wait for response from someone 
more experienced in this area.

> If I change from epgm to tcp (see publishAddress / subscribeAddress
> string) then the publisher sucessfully sends messages, but the
> subscriber doesn't receives them.
You have port misconfiguration. Then you will spot classical issue of 
slow joiners. ZeroMQ works asynchronously and fact that connect call 
succeeded doesn't mean underlying sockets are ready. Add Sleep(1000) 
after connect or make recv call non-blocking and it should work better.


More information about the zeromq-dev mailing list