Socket connection between two devices is in progress, but it sticks well only when tethering is connected, and it cannot be connected when it is in 3G state.

Asked 2 years ago, Updated 2 years ago, 71 views

I turned on tethering on the server side and the client was connected, so the connection was good.

The server app sets the IP address starting with 192.168... and any 1999 port In the client app, when I set it to 192.168... and set the port, the socket was connected well.

When I turned off tethering on the server side and it was in the 3G state, the IP on the server side changed to 10.162... So the client also changed it to that and tried to connect, so it couldn't connect...

If it doesn't work like this, I don't know how to do it, but if you know a keyword or method that can be a hint, please answer.

android socket tethering

2022-09-22 19:53

1 Answers

Consider a stun server or study nat to nat hole punching.


2022-09-22 19:53

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.