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.
我有一台安装了 VmWare 的机器,它添加了两个额外的网络接口。操作系统是 Vista。我有两个 Java 应用程序,一个广播数据报,一个接收这些数据报。我遇到的问题是,除非我禁用两个 VmWare 网络接口,否则接收器无法接收数据报。
在不禁用接口的情况下使其工作的最佳方法是什么?
查看 DatagramSocket 的替代构造函数:
DatagramSocket(int port, InetAddress laddr) Creates a datagram socket, bound to the specified local address.
我猜你只是指定端口。