Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 gethostbyname 调用中,将 gethostname 的结果传递给它。我得到一个指向 hostent 结构的指针。如果 localhost 有多个接口,那么该主机发送多播时使用的默认接口是零索引吗?
不,没有特定的结果排序。它们甚至不一定对应于同一台机器的接口;它们可能是许多单独的机器,为 dns 名称提供循环服务。