当前位置:网站首页>The IP bound to the socket is inaddr_ The meaning of any htonl (inaddr_any) (0.0.0.0 all addresses, uncertain addresses, arbitrary addresses)

The IP bound to the socket is inaddr_ The meaning of any htonl (inaddr_any) (0.0.0.0 all addresses, uncertain addresses, arbitrary addresses)

2022-07-04 07:11:00 Dontla

 Insert picture description here
INADDR_ANY Means monitor 0.0.0.0 Address ,socket Bind port only , It is not bound to a specific ip, Let the routing table decide which one to send ip(0.0.0.0 Address means all addresses 、 Uncertain address 、 Any address )( If there are multiple network cards in a host, there are multiple ip Address )( The routing table should know which port is being used by which ip monitor )

Reference article :socket The binding of ip by INADDR_ANY The meaning of

原网站

版权声明
本文为[Dontla]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141543307725.html