ntohs =net to host short int 16位htons=host to net short int 16位ntohl =net to host long int 32位htonl=host to net long int 32位 网络字节顺序NBO(Network Byte Order) 按从高到低的顺序存储,在网络上使用同一的网络字节顺序,可避免兼容性问题: 主机字节顺序