my_addr.sin_family = AF_INET
时间: 2024-01-18 15:02:43 浏览: 63
my_addr.sin_family = AF_INET是设置套接字地址结构中的地址族字段为AF_INET。AF_INET是IPv4地址族的标识符,用于指定套接字使用的地址类型。\[1\]
#### 引用[.reference_title]
- *1* [IP地址格式转换(htonl、ntohl;inet_addr、inet_ntoa)](https://blog.csdn.net/k916631305/article/details/109498402)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [由 serverAdd.sin_addr.s_addr 引发的思考](https://blog.csdn.net/wumenglu1018/article/details/53906198)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]