能详细讲一下socket这几个函数吗?
看了半天,好像是转换网络地址的,能再详细讲一下吗?谢谢大家!
htonl
-----------------------------------------------------------------------
Converts a 32-bit quantity from host-byte order to network-byte order.
htons
-----------------------------------------------------------------------
Converts a 16-bit quantity from host-byte order to network-byte order.
inet_addr
-----------------------------------------------------------------------
Converts a character string representing a number in the Internet standard ".'' notation to an Internet address value.
inet_ntoa
-----------------------------------------------------------------------
Converts an Internet address value to an ASCII string in ".'' notation that is, "a.b.c.d''.
ntohl2
-----------------------------------------------------------------------
Converts a 32-bit quantity from network-byte order to host-byte order.
ntohs2
-----------------------------------------------------------------------
Converts a 16-bit quantity from network byte order to host byte order.