127.0.0.1 is the device, or the emulator. So as long as you don't have
a server listening on that port on the emulator/device itself you
won't be able to connect. If you want to connect to to a server
running on the host, then you'll have to connect to 10.0.2.2 (or
something like that)

If already know this then you need to explain a bit more or it will be
hard to find somebody that can help you.

-- Urs

On Thu, Jul 16, 2009 at 3:13 PM, Zeeshan Muhammad<genx...@gmail.com> wrote:
> Hi Dear,
>
> i got the same problem when i run my code below:
>
> InetAddress serverAddr = InetAddress.getByName("127.0.0.1");
> Socket socket =   new Socket(serverAddr , 8088 );
>
> i changed the port but same result.
> anybody help plz
>
>
> On Sat, Apr 18, 2009 at 1:25 AM, Hunter Peress <hunt...@gmail.com> wrote:
>>
>> I'm getting:java.net.ConnectException: localhost/127.0.0.1:8000 -
>>                 Connection refused
>>
>>
>> and...i have
>> <uses-permission  android:name="android.permission.INTERNET" />
>> declared in my manifest.xml
>>
>> What am I missing?
>>
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to