INADDR_LOOPBACK
时间: 2023-08-07 10:05:34 浏览: 199
Winscck 编程
INADDR_LOOPBACK是一个常量,它表示绑定到回环地址(Loopback Address),通常是127.0.0.1。绑定到回环地址的套接字只能接收来自本地主机的连接请求,而不能接收来自其他主机的连接请求。\[1\]所以,如果你使用INADDR_LOOPBACK来绑定套接字,那么只有本地主机上的程序可以连接到该套接字。
#### 引用[.reference_title]
- *1* [INADDR_ANY和INADDR_BROADCAST的含义上说明](https://blog.csdn.net/xiao3404/article/details/94223837)[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^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Socket INADDR_ANY INADDR_LOOPBACK 127.0.0.1](https://blog.csdn.net/zhouqingxing/article/details/19165561)[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^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [SOCKET bind INADDR_LOOPBACK和INADDR_ANY的区别](https://blog.csdn.net/w968516q/article/details/53519343)[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^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文