您能否详细说明PIPE_READMODE_MESSAGE/PIPE_READMODE_BYTE有什么区别? [英] Can you explain in more detail what's the difference between PIPE_READMODE_MESSAGE/PIPE_READMODE_BYTE?

查看:133
本文介绍了您能否详细说明PIPE_READMODE_MESSAGE/PIPE_READMODE_BYTE有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我已阅读文档此处,对我来说这仍然没有意义:

Though I've go through the document here, it still doesn't make sense to me what it is:

从管道以流形式读取数据 的消息.此模式只能是 如果PIPE_TYPE_MESSAGE也是 指定.

Data is read from the pipe as a stream of messages. This mode can be only used if PIPE_TYPE_MESSAGE is also specified.

推荐答案

在BYTE模式下,您需要弄清楚数据的分离,以便可以在接收端对其进行解码.在MESSAGE模式下,API将为您执行此操作.当您在另一侧阅读消息时,将拥有整个数据块(消息).

In BYTE mode, you are the one that needs to figure out the separation of the data so that it can be decoded at the receiving end. In MESSAGE mode, the API will do this for you. When you read the message on the other side you will have the whole block of data (the message).

在两种情况下,如果您正在混合通过管道发送的数据类型,您仍将需要一些头数据来包装消息/数据,以了解消息/数据是什么.

In both cases, you will still need some header data to wrap your message/data to know what it is if you are mixing data types sent through the pipe.

文档指向使用此API和两者之间的MESSAGE模式的客户端/服务器的非常清晰的示例.

The documentation points to a very clear example of Client/Server using this API and the MESSAGE mode between both.

http://msdn.microsoft. com/en-us/library/aa365592%28v = VS.85%29.aspx

http://msdn.microsoft. com/en-us/library/aa365588%28v = VS.85%29.aspx

这篇关于您能否详细说明PIPE_READMODE_MESSAGE/PIPE_READMODE_BYTE有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆