I hope, most of the Android Developer know about ADB (Android Debugging Bridge) Tool. It is very handy to make a quick connection to an Android target (Emulator or Device) for debugging and has number of useful options (shell, install, push, pull, forward, etc ..). The ADB Forward option is a less used option. It is very useful for making a socket communication between the target and host with-out getting into complex socket programming.
Format: adb forward Protocol:HostPort Protocol:TargetPort
Here is a netcat based example, which I tried on the Emulator and HTC Desire (Rooted & Running Cynogen Mod 7).
From Host (GNU/Linux PC):
$ adb forward tcp:12345 tcp:12346
$ nc 127.0.0.1 12345
From Target (after adb shell):
# nc -l -p 12346
whatever string typed on target will appear on host and vice versa. This can be used to forward some command from target to host, etc ..