[zeromq-dev] [zyre] Can not get UDP beaconing working

Stanislav Ivochkin isn at extrn.org
Wed Aug 27 07:44:22 CEST 2014


Hi all!

I've wrote a simple program to play with zyre, but it does not work as I
expect.

#include <thread>
#include <zyre.h>

int main(int argc, char* argv[])
{
  auto node = zyre_new(nullptr);
  auto rc = zyre_start(node);

  auto spammer = std::thread([node]() {
    while (true) {
      zyre_dump(node);
      sleep(1);
    }
  });

  sleep(10000); // wait for termination signal in original
  zyre_stop(node);
  zyre_destroy(&node);
  spammer.join();
}

Having two instances of the program running I always see "peers: 0" line.
Does it mean that instances do not see each other?

Could you please guide me how to use zyre correctly.

I am using
- ubuntu 14.04 x86_64 gcc 4.8.2
- libsodium 0.7.0 f241744e4dfd1529b309402cd59a7e5a3a5b4f73
- libzmq master 81485c7688a19cb947f77aad7765a2de59f10eb5
- czmq master c0bb78891b149f106845be87d221a5fca5c0c4bb
- zyre master f98749d0b5d9404b0f9ff4310845c705413214d0

Should I switch to more stable versions? What combination would you suggest?

-- 
Regards,

Stas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140827/73e6b65c/attachment.html>


More information about the zeromq-dev mailing list