网络字节序与主机字节序之间的转换 #include <netinet/in.h>
uint16_t htons(uint16_t host16bitvalue);
uint32_t htonl(uint32_t host32bitvalue); 返回网络字节序 uint16_t ntohs(uint16_t net16bitvalue);
uint32_t ntohl(uint32_t net32bitvalue); 返回主机字节序 h--host n--networks s--short l--long