In the ZMQ_REQ
/ZMQ_REP
example a buffer is initialized and then the message is copied into it using memcpy
.
Specifically:
zmq::message_t reply (5);
memcpy (reply.data (), "World", 5);
socket.send (reply);
How to reply to the message using a char pointer reference?
That is, something along the lines of:
char* text = "Hello";
zmq::message_t reply ();
socket.send (text);
Aucun commentaire:
Enregistrer un commentaire