The Zmq_msg_get_zeromq of ZEROMQ

Source: Internet
Author: User
Tags assert

int Zmq_msg_get (zmq_msg_t ' *message ', int ' property ');

Get the properties of a message

Zmq_more: Indicating that there is still news.

The value of this property was successfully returned, and the failure returned 1.

Error codes are:

Einval. This property is unknown.

Example

zmq_msg_t frame;

while (true) {

Create a empty 0MQ message to hold the message frame

int rc = Zmq_msg_init (&frame);

ASSERT (rc = 0);

Block until a-available to was received from socket

rc = ZMQ_MSG_RECV (socket, &frame, 0);

ASSERT (RC!=-1);

if (Zmq_msg_get (&frame, Zmq_more))

fprintf (stderr, "more\n");

else {

fprintf (stderr, "end\n");

Break

}

Zmq_msg_close (&frame);

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.