本文介绍了为什么将网络字节顺序定义为big-endian?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如标题中所述,我的问题是,为什么 TCP/IP 在传输数据时使用大端编码,而不是替代的小端方式?
As written in the heading, my question is, why does TCP/IP use big endian encoding when transmitting data and not the alternative little-endian scheme?
推荐答案
RFC1700 说必须是. (并将网络字节顺序定义为big-endian).
RFC1700 stated it must be so. (and defined network byte order as big-endian).
他们引用的是
On Holy Wars and a Plea for Peace
Cohen, D.
Computer
摘要:
结论是,大端和小端方案都是可能的.没有更好/更糟方案,只要在整个系统/协议中保持一致,就可以使用任何一种方案来代替另一种方案.
It concludes that both big-endian and little-endian schemes could've been possible. There is no better/worse scheme, and either can be used in place of the other as long as it is consistent all across the system/protocol.
这篇关于为什么将网络字节顺序定义为big-endian?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!