[zeromq-dev] C++ syntax for new ZMQ objects

Claudio Carbone erupter at libero.it
Sat Dec 15 16:34:20 CET 2012


On 15/12/12 16:28, Claudio Carbone wrote:
>
> Exact failing point is in socket_base.cpp at line 323:
> /    rc = parse_uri (addr_, protocol, address);
>     if (rc != 0)
>         return -1;/
>
> Even if rc is effectively 0 (checked in GDB), the if (don't know why) 
> returns true.
> I'm at a loss here...

My bad, it's not there, rather somewhere deeper down the flow.
Anyway I've attached my simple library if anyone is feeling particularly 
altruistic and wants to help me.
Here is the main I'm using

#include <cstdlib>
#include <saetta.h>

using namespace std;

/*
  *
  */
int main(int argc, char** argv) {
     Saetta::Server *myserver=new Saetta::Server;
     Saetta::Client *myclient=new Saetta::Client;

     while(1){
         myserver->worker();
         myclient->worker();
     }
     return 0;
}

Claudio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121215/f26769e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saetta.cpp
Type: text/x-c++src
Size: 1843 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121215/f26769e1/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saetta.h
Type: text/x-chdr
Size: 849 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121215/f26769e1/attachment.h>


More information about the zeromq-dev mailing list