博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ZeroMQ接口函数之 :zmq_msg_get - 获取消息的性质
阅读量:4648 次
发布时间:2019-06-09

本文共 1579 字,大约阅读时间需要 5 分钟。

ZeroMQ 官方地址 :

zmq_msg_get(3)      ØMQ Manual - ØMQ/3.2.5

Name

zmq_msg_get - 获取消息的性质

Synopsis

int zmq_msg_get (zmq_msg_t *message, int property);

Description

zmq_msg_get()函数会返回message参数指定的消息的属性值,属性由property参数指定。

以下的属性可以由zmq_msg_get() 函数获取。

  ZMQ_MORE

    这个参数指出在这个message之后是否还有更多的消息帧。

Return value

zmq_msg_get()函数如果执行成功则返回消息的属性值。否则函数返回 -1,并且设置errno为下列指定的值。

Errors

  EINVAL

    请求的属性未知。

Example

  接收一个多帧的消息。

1 while (true)  2 { 3     //  Create an empty ØMQ message to hold the message fram 4     int rc = zmq_msg_init (&frame); 5     assert (rc == 0); 6     //  Block until a message is available to be received from socket 7     rc = zmq_recvmsg (socket, &frame, 0); 8     assert (rc != -1); 9     if (zmq_msg_get (&frame, ZMQ_MORE))10         fprintf (stderr, "more\n");11     else 12     {13         fprintf (stderr, "end\n");14         break;15     }16     zmq_msg_close (frame); 17 }

See also

zmq_msg_set(3)  zmq_msg_init(3)  zmq_msg_close(3)  zmq(7)

Authors

This ØMQ manual page was written by Chuck Remes <cremes@mac.com> and Pieter Hintjens <ph@imatix.com>.

Web site design and content is copyright (c) 2007-2012 iMatix Corporation. Contact us for professional support. Site content licensed under the Creative Commons Attribution-Share Alike 3.0 License. ØMQ is copyright (c) Copyright (c) 2007-2012 iMatix Corporation and Contributors. ØMQ is free software licensed under the LGPL. ØMQ, ZeroMQ, and 0MQ are trademarks of iMatix Corporation. Terms of Use — Privacy

Policy

 

更多 ZeroMQ API :

 

翻译:风波

mail : fengbohello@qq.com

 

转载于:https://www.cnblogs.com/fengbohello/p/4246727.html

你可能感兴趣的文章
AVL树、splay树(伸展树)和红黑树比较
查看>>
多媒体音量条显示异常跳动
查看>>
运算符及题目(2017.1.8)
查看>>
React接入Sentry.js
查看>>
ssh自动分发密匙脚本样板
查看>>
转 小辉_Ray CORS(跨域资源共享)
查看>>
Linux安装postgresql
查看>>
MyBatis启动:MapperStatement创建
查看>>
【 全干货 】5 分钟带你看懂 Docker !
查看>>
[转]优化Flash性能
查看>>
popStar手机游戏机机对战程序
查看>>
Java Web项目结构
查看>>
lambda表达式树
查看>>
二次注入原理及防御
查看>>
会话记住已登录功能
查看>>
Linux内核分析——可执行程序的装载
查看>>
儿子和女儿——解释器和编译器的区别与联系
查看>>
第一阶段冲刺3
查看>>
父类引用指向子类对象
查看>>
网页如何实现下载功能
查看>>