阅读背景:

填充或不填充 - 创建通信协议

来源:互联网 

I am creating a protocol to have two applications talk over a TCP/IP stream and am figuring out how to design a header for my messages. Using the TCP header as an initial guide, I am wondering if I will need padding. I understand that when we're dealing with a cache, we want to make sure that data being stored fits in a row of cache so that when it is retrieved it is done so efficiently. However, I do not understand how it makes sense to pad a header considering that an application will parse a stream of bytes and store it how it sees fit. I am creating a protocol to have two applicatio




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: