简体   繁体   中英

Android socket client server communication between two phones over internet fails

Can this be done? One phone is a surveillance camera and writes output to a socket. With 2 phones on the same wi-fi, this works perfectly. I have a router and have set port forwarding and have created a static address on the server phone taking video via camera. The client phone that has to view video uses mobile data. The application on the client will timeout creating socket on a public ip and port number of the server phone.

Where do I go wrong? Below is NAT settings on my router. I get my public ip from google (search my IP). Some people claim to have this working but they don't give details.

路由器上的端口转发

Will this connection setting have an effect on my problem?

连接设定

The issue here was with the ISP restricted apn. They do not allow inbound connections.

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