Android Network Emulators Network

So, I have an Android app that needs to connect to a socket server. It is simple enough if the socket server was running on my development machine. However, the socket server is running on the server not only on my machine, but on a different subnet. How to connect the emulator to the socket server? I understand how port forwarding works to connect to the local machine, but I'm a little confused about how I can redirect it over the subnet from my dev machine.

+3
source share
1 answer

Can you connect to the socket server from the host machine of the emulator? I don’t know about you, but I tested the network client application on the Android emulator, and it seems to have access to anything on the network that can only be in my development box using standard Java network calls, and no special emulator settings . This includes the wider Internet.

If you cannot, you need to configure the server side to make sure that the server is located on remote computers; this has nothing to do with what you do on the side of the Android emulator, unless the server is an Android emulator. Perhaps this is due to firewall rules and standard network routing.

+1
source

Source: https://habr.com/ru/post/1758458/


All Articles