Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Android
connect to "IP" timed out
Vassili Vladimir
Ranch Hand
Posts: 1585
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I am using the following code to connect to a server:
String url = "some url"; httpPost = new HttpPost(url); String responseString = null; try { httpClient.getParams().setIntParameter("http.connection.timeout", 5000); HttpResponse response = httpClient.execute(httpPost); } catch (Throwable t) { return "Connection Timed Out..."; }
It works fine with the android localhost "10.0.2.2" but when attempting to connect to another server (non localhost) it says connect timed out! What can be the reason?
Please advice,
Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Pramod P Deore
Ranch Hand
Posts: 633
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It may be because you are behind proxy.
Life is easy because we write the source code.....
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
problem running example in mikalai notes
JDBC Connection problem
Locating Remote Session Bean Using JNDI--JNDI-Root Error Socket Timeout Jboss.5.1.GA
Help required for JMS on Jboss server
JMS reliability
More...