C语言只规定short <= int <=long int。具体还得看具体的编译器
htons() host to network short
htonl() host to network long
ntohl() network to host long
ntohs() network to host short
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlog);
uint16_t ntohs(uint16_t netshort);
这种时候你man一下就好了啊