Hi Nik,

It looks like you asked your question on Stack Overflow, and I answered it
there:

http://stackoverflow.com/questions/38647671/unable-to-send-capnp-messages-over-zmq

(I know you already know this, just mentioning it for others who might find
this thread.)

-Kenton

On Thu, Jul 28, 2016 at 3:09 PM, Nik <[email protected]> wrote:

> I am sorry it should be
>
> Guitar::Builder guitar = message.initRoot<Guitar>();
>
>
> On Thursday, 28 July 2016 14:31:46 UTC-7, Nik wrote:
>>
>> Hi,
>>
>> I am trying to send a capnp message over ZMQ. The following is the code :
>>
>> ::capnp::MallocMessageBuilder message;
>> Attitude::Builder guitar = message.initRoot<Guitar>();
>> guitar.setModel(1);
>> att.setPrice(1200);
>>
>> kj::Array<capnp::word> words = messageToFlatArray(message);
>>
>>                 _publisher.send(words);
>>
>>
>> I am using the publish-subscribe pattern in ZMQ. The error that I get
>> during compilation is:
>>
>>
>>                error: no matching member function for call to
>>       'send'
>>         _publisher.send(words);
>>         ~~~~~~~~~~~^~~~
>> /usr/local/include/zmq.hpp:610:21: note: candidate function not viable:
>> no known conversion from 'kj::Array<capnp::word>' to
>>       'zmq::message_t &' for 1st argument
>>         inline bool send (message_t &msg_, int flags_ = 0)
>>                     ^
>> /usr/local/include/zmq.hpp:627:21: note: candidate function not viable:
>> no known conversion from 'kj::Array<capnp::word>' to
>>       'zmq::message_t' for 1st argument
>>         inline bool send (message_t &&msg_, int flags_ = 0)
>>                     ^
>> /usr/local/include/zmq.hpp:620:35: note: candidate function template not
>> viable: requires at least 2 arguments, but 1 was
>>       provided
>>         template<typename I> bool send(I first, I last, int flags_=0)
>>                                   ^
>> /usr/local/include/zmq.hpp:600:23: note: candidate function not viable:
>> requires at least 2 arguments, but 1 was provided
>>         inline size_t send (const void *buf_, size_t len_, int flags_ = 0)
>>
>>
>> Please let me know what could be the solution.
>>
>> Thanks for the support.
>>
>> Thanks And Regards,
>> Nik
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/group/capnproto.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to