struct sockaddr_in{ sa_family_tsin_family; //地址族,常用AF_INET uint16_t sin_port; //16位TCP/UDP端口号 struct in_addr sin_addr; //32位IP地址 cha sin_zero[8] //不使用 }; struct in_addr{ in_addr_t s_addr; //32位IPV4地址 } struct sockaddr_in6 { sa_family_t sin6_family; ...