I am trying to communicate between two android emulators for communication , thus I am trying to forward port X to port Y on 127.0.0.1 where port X is the port I am transmitting too and Y is the one I am receiving . Is this possible and if so how do I forward the local ports?
The socat tool is useful for this:
socat TCP-LISTEN:Y TCP:localhost:X
(assuming you're in Linux)