[zeromq-dev] multipart message receiving does not work with C++

Seref Arikan serefarikan at kurumsalteknoloji.com
Wed Jun 1 17:22:18 CEST 2011

I have an extremely simple test code; some Java code sends multipart
messages and c++ code receives it.
C++ code dies on me without any proper exception, but C version taken
from the online guide works. I've cropped code to a minimum, and the
working and not working versions are as follows (in the same code

int _tmain(int argc, _TCHAR* argv[])
	zmq::context_t context(1);
	zmq::socket_t socket(context, ZMQ_REP);

                //These two lines do not work
		zmq::message_t request;

		//zmq_msg_t message;
		//zmq_msg_init (&message);
		//zmq_recv (socket, &message, 0);
	return 0;

If I send single messages, both versions work. When I send multipart
messages, the C version works, but C++ version does not. This is
windows xp sp3 with vs.net 2010 express, with zeromq 2.1.1

What am I missing here?


More information about the zeromq-dev mailing list