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

2011-06-02 Thread Seref Arikan
Hi Chuck, Thanks for the feedback. I've made my code work with multipart messages, and it is quite fast. It is quite flexible this way, so I'll keep it :) On Thu, Jun 2, 2011 at 3:14 PM, Chuck Remes wrote: > There is no reason to avoid using multi-part messages. I think they are a > great way t

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

2011-06-02 Thread Chuck Remes
There is no reason to avoid using multi-part messages. I think they are a great way to logically separate different components of a complex message so I use them in that way pretty regularly. 0mq guarantees that all parts will be made available atomically. This means that if you send a message

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

2011-06-02 Thread Seref Arikan
Hi Martin, Indeed this would be a solution, and Jashua has kindly provided a link for a way to do this. I'm using protocol buffers in a complicated wrapper scenario, and in general I'd like to get multipart messaging up and running, since it feels as if it will offer more flexibility. Given my curr

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

2011-06-02 Thread Joshua Foster
Here is a recommended way in protobufs - http://code.google.com/apis/protocolbuffers/docs/techniques.html#self-description Joshua On Jun 2, 2011, at 6:53 AM, Martin Sustrik wrote: > On 06/02/2011 11:37 AM, Seref Arikan wrote: >> I'm already using protocol buffers. The thing is, I can be passing

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

2011-06-02 Thread Martin Sustrik
On 06/02/2011 11:37 AM, Seref Arikan wrote: > I'm already using protocol buffers. The thing is, I can be passing > around any protocol buffer serialization; so I need an envelope to > tell the receiving party about the type of the message. > I'm using multipart messages to pass two protocol buffer

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

2011-06-02 Thread Seref Arikan
I'm already using protocol buffers. The thing is, I can be passing around any protocol buffer serialization; so I need an envelope to tell the receiving party about the type of the message. I'm using multipart messages to pass two protocol buffer serializations; first one that contains data regardi

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

2011-06-02 Thread Ian Barber
On Thu, Jun 2, 2011 at 9:29 AM, Seref Arikan < serefari...@kurumsalteknoloji.com> wrote: > Thanks Martin, will do that. > I'm in a bit of a hurry, so I'll try to cut some corners here: any > alternatives to multipart messages for message envelopes that you'd > recommend? > > Regards > Seref > > Go

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

2011-06-02 Thread Seref Arikan
Thanks Martin, will do that. I'm in a bit of a hurry, so I'll try to cut some corners here: any alternatives to multipart messages for message envelopes that you'd recommend? Regards Seref On Wed, Jun 1, 2011 at 4:49 PM, Martin Sustrik wrote: > Hi Seref, > >> int _tmain(int argc, _TCHAR* argv[]

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

2011-06-01 Thread Martin Sustrik
Hi Seref, > int _tmain(int argc, _TCHAR* argv[]) > { > > > > zmq::context_t context(1); > zmq::socket_t socket(context, ZMQ_REP); > socket.bind("tcp://*:"); > > while(true){ > //These two lines do not work > zmq::messa

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

2011-06-01 Thread Seref Arikan
Greetings, 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 follo