Sanju & Sam,
This is certainly possible. I think you should check your router
configuration - maybe a firewall is blocking the connection.
Also double-check your IP addresses with respect to the router's local
network setup (IP/mask).
-- Kostya
20.07.2010 3:01, Sam Miller пишет:
I am having the same issue. This is the line it gets stuck at:
Socket socket = new Socket (SERVERIP, SERVERPORT);
On Jun 20, 2:11 pm, Sanju<[email protected]> wrote:
Hello,
I am trying to do a simple program where in I need to communicate
between a TCP Server and a client (android device). First I simulated
the complete communication on local server and things worked fine. Now
I tried to test it from device. I installed my activity on the device
and tried to connect to the server.
The server has IP address 192.168.2.8 and the client has ip address
192.168.2.11. Both are connected to the same wireless point. The
connection from client to server is never successful. It always times
out.
I get following exception -
java.net.SocketException: The operation timed out
E/ClientActivity( 1166): at
org.apache.harmony.luni.platform.OSNetworkSystem.connectSocketImpl(Native
Method)
E/ClientActivity( 1166): at
org.apache.harmony.luni.platform.OSNetworkSystem.connect(OSNetworkSystem.ja va:
114)
E/ClientActivity( 1166): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:
245)
E/ClientActivity( 1166): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:
220)
E/ClientActivity( 1166): at
java.net.Socket.startupSocket(Socket.java:780)
E/ClientActivity( 1166): at java.net.Socket.<init>(Socket.java:
314)
E/ClientActivity( 1166): at
com.cogknit.adhoc.client.Client.connect(Client.java:38)
Can anybody help me to rectify this problem. What could be the reason
for this time out. I need to get this done in couple of days. So
please help me asap.
Thanks,
Sanjay
--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en