[android-developers] ServerSocket problem

2010-06-25 Thread Alex Xin
Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final

Re: [android-developers] ServerSocket problem

2010-06-25 Thread Alex Xin
more on this problem... it works great in emulator, but always failed on real device On Sat, Jun 26, 2010 at 1:03 AM, Alex Xin xinxi...@gmail.com wrote: Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to

Re: [android-developers] ServerSocket problem

2010-06-25 Thread social hub
do you know what's the ip address you got on the real device. There are chances the real device is on NAT network. In such a case you wont be able to talk directly to the device. On Fri, Jun 25, 2010 at 12:04 PM, Alex Xin xinxi...@gmail.com wrote: more on this problem... it works great in

Re: [android-developers] ServerSocket problem

2010-06-25 Thread Alex Xin
thanks for reply. It's not an IP problem, my real device and client computer are all connected to local network through a WIFI router, they can connect to each other directly. My phone has IP address: 192.168.0.176 and computer's IP is 192.168.0.126, assigned by DHCP. I found that if I establish