简体   繁体   中英

Java Web Communications Without Port Forwarding

我希望制作一个程序,其中两个客户端将彼此连接,并且其中一个客户端将托管服务器...两个客户端都应该能够连接到服务器...有没有办法进行此操作而无需端口转发...某种对等系统?

Yes, the simple solution is TURN, where all communication passes through the server (Peer A <-> Server <-> Peer B). The server has to have a public IP address to be reachable from the anywhere on the net.

Peers should initiate and keep 'alive' TCP connections to the server.

也许您正在寻找RMI。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM