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

Chuck Remes cremes.devlist at mac.com
Thu Dec 2 22:30:06 CET 2010


On Dec 2, 2010, at 2:41 PM, Jay Banyer wrote:

> Gday,
> 
> 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://127.0.0.1:8000
> Seems to work.
> 
> Run subscriber, it fails as follows:
> 
> $ ./Debug/zmq_test sub tcp://127.0.0.0.1:8000
> Starting subscriber for tcp://127.0.0.0.1:8000
> calling zmq_socket
> connecting to tcp://127.0.0.0.1:8000
> zmq_connect error: (22) Invalid argument
> 
> zmq version: 2.0.6beta.dfsg-2

Aside from the typo, try running a later version like 2.0.10 or the recent 2.1.0 beta release.

cr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101202/59407f01/attachment.htm>


More information about the zeromq-dev mailing list