[zeromq-dev] zmq_connect on SUB socket error errno 22

Jay Banyer jbanyer at gmail.com
Thu Dec 2 21:41:31 CET 2010


I'm new to 0MQ and my first attempt at using it is stuck. zmq_connect() for
a SUB socket is failing with errno == 22.

Code is here: http://pastebin.com/HctDf64J

Compile with: g++ -l zmq -o zmq_test <file.cpp>

Run publisher with: ./zmq_test pub tcp://
Seems to work.

Run subscriber, it fails as follows:

$ ./Debug/zmq_test sub tcp://
Starting subscriber for tcp://
calling zmq_socket
connecting to tcp://
zmq_connect error: (22) Invalid argument

zmq version: 2.0.6beta.dfsg-2

System details:
$ uname -a
Linux 2.6.35-23-generic #40-Ubuntu SMP Wed Nov 17 22:15:35 UTC 2010 i686

Any help appreciated!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101203/3e806337/attachment.htm>

More information about the zeromq-dev mailing list