[zeromq-dev] Message API questions

Jorge.Gonzalez at l-3com.com Jorge.Gonzalez at l-3com.com
Thu Mar 19 22:56:12 CET 2015


All,
I think  I found some answers.
The Bad address error was due to the fact that I was initializing one message but trying to send an uninitialized message (typo).

I'd still like to get some feedback on my questions.
Thanks,
Jorge

From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Jorge.Gonzalez at l-3com.com
Sent: Thursday, March 19, 2015 4:16 PM
To: zeromq-dev at lists.zeromq.org
Subject: [zeromq-dev] Message API questions

Hello,

I have a server using ROUTER sockets and clients using DEALER sockets.  The idea is to follow a protocol where:

1.     Client sends request

2.     Server sends a reply with information

3.     Client reads the reply from server and depending on the information, send data to the server

4.     The server should then read the data and store it in a queue.

Steps 1 - 3 work, however when the client sends the data, the server errors with "Bad address" and quits.

Questions:

1.     Must the ROUTER socket code read the identity before sending or receiving every message?

2.     After a message is received (zmq_msg_recv(&msg)), can the same message be sent (zmq_msg_send(&msg, socket, ZMQ_SNDMORE))?

Thanks,
Jorge

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150319/fc8a50b1/attachment.htm>


More information about the zeromq-dev mailing list