Socket中常见的几个转换函数(htonl,htons,ntohl,ntohs,inet_addr,inet_ntoa) htonl() htons() ntohl() ntohs()及inet_ntoa() inet_addr()的用法 注:其中的h表示“host”,n表示“net”,l表示“long”, s表示“short”a表示“ascii”,ddr表示“in_addr结构体” 现在我们很幸运,因为我们有很多的函数来方便地操作 IP 地址.没有 必要用手工计算它们,也没有必要用"一个so…