开发者

Client-Server Communication (without port forwarding) when both are behind routers

开发者 https://www.devze.com 2023-02-28 12:26 出处:网络
hi I have a client and server both of which are behind routers. They need to communicate over sockets. Enabling port-fo开发者_C百科rwarding is not an option.

hi I have a client and server both of which are behind routers. They need to communicate over sockets. Enabling port-fo开发者_C百科rwarding is not an option. The client-server will maintain a live socket connection and the server will notify the client when an event occurs. Polling as an alternative for the client is not an option. I am using plain-java. How do I go about doing this?

Regards Chimanrao


You may try to use UPnP. That is about the only option if you do not have a server outside of the NAT.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号