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.
我正在使用 UDP 协议(DatagramSocket 和 DatagramPacket)进行多人游戏。该程序必须同时做客户端和服务器。这在 LAN 网络上运行良好,但我也想让它在 Internet 上运行。我曾尝试使用 hamachi,但它不起作用,信息只在一个方向。
编辑:好的,我用另一种方式问。是否有任何 java 类、程序或其他任何东西可以使用 java 连接互联网上的两台计算机?
好的,我刚刚解决了这个问题。它适用于hamachi。我复制了错误的IP,所以它不起作用。如果您互相交换IP,它可以工作。