在循环中使用zmsg_send时,前2条消息到达服务器而第3条消息没有到达。任何解决方案?
void main(void)
{
// --------------------------------------------------------WAS MEANT SERIOUSLY:
int major, minor, patch;
zmq_version ( &major, &minor, &patch );
printf ( "Current ØMQ version is %d.%d.%d\n",
major, minor, patch );
// --------------------------------------------------------WAS MEANT SERIOUSLY
zsock_t *client;
zmsg_t *msg;
client = zsock_new(ZMQ_REQ);
zsock_connect(client, "ipc:///var/run/dummy_daemon.ipc");
while(true){
msg = zmsg_new();
zmsg_addstr(msg, "hello");
zmsg_send(&msg, client);
zmsg_recv(client);
}
}