[zeromq-dev] czmq ZMQ_RCVMORE option length

KIU Shueng Chuan nixchuan at gmail.com
Tue Oct 16 06:57:19 CEST 2012


Since the value type of ZMQ_RCVMORE has changed to int in zmq 3.2 (was
int64_t in zmq 2.2),
wouldn't the implementation of czmq's zsocket_rcvmore() be faulty on
Big Endian machines?

int zsocket_rcvmore(void *socket)
int64_t rcvmore;
size_t option_len = sizeof (int64_t);
zmq_getsockopt(socket, ZMQ_RCVMORE, &rcvmore, &option_len);
return (int)rcvmore;

It seems to me that zmq_getsockopt() would be modifying the 1st 4
bytes of "rcvmore" whereas the subsequent cast would return the least
signficant 4 bytes? (Equivalent on LE but not on BE)

More information about the zeromq-dev mailing list