|
某些协议定义的数据存放格式不一致,
用这些函数(或宏)来转换数据格式。
ntohl
network order to host byte order
ntohl function converts a u_long
Server
u_long htonl(u_long hostlong);
举例:htonl(0)=0
htonl(80)= 1342177280
client
u_long ntohl(u_long netlong);
举例:ntohl(0)=0
ntohl(1342177280)= 80
小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)
GMT+8, 2024-5-17 23:35
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.