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.
我有一台带两个网卡的电脑,我使用 htmlunit 进行网络测试,是否有运行 2 个 htmlunit 实例并选择哪个实例使用哪个网卡?
问候!
绑定到客户端套接字或打开服务器套接字时,指定显式本地 IP 地址以选择适配器。java.net.NetworkInterfaceAPI 提供了枚举适配器并获取其 IP 的方法
java.net.NetworkInterface