在 RPC 中,接收方如何识别发送方架构?
我试图了解发送者如何识别发送者的字节序。我知道初始字节通常是发送者的体系结构/类型。例如 0x00 是 i386 等。但是,如果接收者不知道如何解释第一个字节,那么它有什么帮助呢?
I am trying to wrap my head around how the sender identifies the endianness of the sender. I know the initial byte is usually the architecture/type of the sender. For example 0x00 is i386 etc. However, how does the first byte help at all if the receiver has no idea how to interpret it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
字节顺序是指将字节排序为较大的数字,而不是字节内的位顺序。单个字节始终是字节序安全的;网络透明地传输字节流(即,字节的接收顺序与发送顺序相同)。
Endianness refers to the ordering of bytes into larger numbers, not the order of bits inside a byte. A single byte is always endian-safe; networks transfer byte streams transparently (that is, bytes are received in the same order in which they were sent).