thanks for the reply Yusuf,
i am able to connect socket through this ip 10.0.2.2 in emulator as Grob
suggested
in a different thread but when i check it on real device it gives me "no
 route to host" exception.

my android device is attached to the same pc my server program is running
on.

i dont know which ip shall i use in my real device to connect to the server
pc




On Thu, Jul 16, 2009 at 5:55 PM, Yusuf T. Mobile <[email protected]>wrote:

>
> "Connection refused" is a standard TCP error, not Android-specific. So
> see if you can telnet into the same IP address and port, using a PC on
> the same subnet as your phone, if possible. For example, if you can
> put both the PC and phone are on the same WiFi network.
>
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
>
>
>
> On Jul 16, 6:19 am, Zeeshan Muhammad <[email protected]> wrote:
> > i have the similar problem,
> >
> > my main java class listening a server socket at port 8088
> >
> > now when my client (android) try to connect a socket it refused the
> > conenction
> >
> > InetAddress serverAddr = InetAddress.getByName("127.0.0.1");
> > Socket socket =   new Socket(serverAddr , 8088 );
> >
> >   java.net.ConnectException:
> > /127.0.0.1:8088<http://192.168.0.173/192.168.0.173:7000>
> > Connection refused
> >
> > anybody help plz
> >
> > On Sun, Apr 26, 2009 at 7:53 PM, Rande Arievilo Moreira <
> >
> >
> >
> > [email protected]> wrote:
> >
> > > Hi Ask,
> >
> > > I'm developing the same application with Lillian. After debugging a
> > > little bit, I found out that we're receiving the following exception:
> >
> > >    java.net.ConnectException: 192.168.0.173/192.168.0.173:7000 -
> > > Connection refused
> >
> > > 192.168.0.173 is the IP of my machine (the server) in the Local
> > > Network.
> > > Any suggestion?
> >
> > > Thanks.
> >
> > > On Apr 7, 9:21 am, Ask <[email protected]> wrote:
> > > > Can you send the exception you are getting or some code snippets,
> >
> > > > it can be some io exception...
> >
> > > > On Apr 7, 4:58 pm,LillianBrandão <[email protected]> wrote:
> >
> > > > > I've already done at the server machines:
> > > > > redir add tcp:7000:7000.
> >
> > > > > --
> > > > >LillianBrandão
> >
> > > > > On Tue, Apr 7, 2009 at 8:47 AM, Ask <[email protected]> wrote:
> >
> > > > > > Have you done port forwarding at server machine??
> >
> > > > > > Any message which is coming to the server should be redirected
> > > towards
> > > > > > the emulator port : 7000
> >
> > > > > > On Apr 7, 4:35 pm,LillianBrandão <[email protected]> wrote:
> > > > > > > Hi all,
> >
> > > > > > > I have an application client/server and I want to install this
> > > > > > application
> > > > > > > in differente machines. The server is located in IP_SERVER,
> > > listening
> > > > > > port
> > > > > > > 7000.
> > > > > > > I want to start a cliente in another machine with IP_Y and
> connect
> > > to the
> > > > > > > server on the different machine.
> >
> > > > > > > I've started the server and I've created the socket like this:
> > > > > > > ... new ServerSocket(7000);
> >
> > > > > > > I've started the client and I've created the socket like this:
> > > > > > > ...new Socket(SERVER_IP, 7000)
> >
> > > > > > > But the client did not connect to the server. I've already set
> the
> > > > > > > INTERNET_PERMISSION.
> > > > > > > Any suggestions how to do it?
> > > > > > > Anybody else have already done a client/server application that
> > > > > > communicate
> > > > > > > between differente machines?
> >
> > > > > > > Thanks in advance,
> > > > > > >LillianBrandão.- Hide quoted text -
> >
> > > > > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to