I am running my android emulator on my machine. I have a virtual machine running that is on a host-only network with. The address of the interface is 192.168.56.1 and my VM is 192.168.56.2, I want to make a socket connection from my emulator to a java program running on the virtual machine. I have googled around but can't find a concrete answer. Do I need to do some sort of forwarding so my emulator can see the interface. I can create a connection between my host and VM by doing the following
Socket s = new Socket();
s.bind(new InetSocketAddress("192.168.56.1",9090);
s.connect(new InetSocketAddress("192.168.56.2",9090);
This will create a socket connection, but what do I have to do to create a socket connection from Emulator to VM?