[zeromq-dev] zmq_send_msg return positive number not zero

Stathis Gkotsis stathis.gkotsis at commsquare.com
Wed Nov 28 23:39:17 CET 2012


According to this: http://api.zeromq.org/3-3:zmq-msg-send , the return value is the number of bytes in the message if successful.
________________________________________
From: zeromq-dev-bounces at lists.zeromq.org [zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Brad Taylor [cbradtaylor at gmail.com]
Sent: Thursday, November 29, 2012 12:33 AM
To: zeromq-dev at lists.zeromq.org
Subject: [zeromq-dev] zmq_send_msg return positive number not zero

Code snippet below…..


rc = zmq_msg_send(&zmqRequestMessage,pZmqSocket,0);
if (rc) {
pResponse->rc = LZ_JEZRC_ZMQSENDFAILED;
pResponse->errnumber = errno;
break;
}

In debug mode, I check the value of rc and get a value of 329, which just happens to be my message size.  Am I doing something wrong here.  Seems to be behaving like socket send, return #bytes sent.  Doc says rc should be 0.

Thank you



More information about the zeromq-dev mailing list