I am running java server socket code on 4747 port on my machine .
and running client socket code in android emulator on different machine .
now client code on android emulator also created tcp socket on which server socket on my machine will send respose.client is listening on 4748.
when i run client it sends message to my server and i get it in server but when server tries to connect to client socket its giving me "connect refused" exception.
my machines behind firewall in our LAN , adb forword worked for me when i ran both programs on localhost . but for 2 diffrent machines its not working.
I also tried stcppipe.exe but maybe as i dont have public ip , its not working.
I can see client listening on port 4748 using "netstat -a" but my server cant connect to that port in client's machine .
i have tried with direct machines IP address(10.11.X.X ) while creating sockets .
even tried giving emulators " 10.0.2.2" or "10.0.2.15" address in client program. but nothing worked.
anybody has got solution to this problem ? any pointers will be really helpful.