[android-developers] Re: Problem on creating Socket

2009-03-30 Thread guishenl...@gmail.com
For the PC side, the server code is just the same as usual java server code. And for the emulator side, you need to change the ip address represent local machine from 127.0.0.1 to 10.0.2.2. On Mar 28, 6:04 am, ndefo arnauld wrote: > hi, > please, it is possible to use a socket a android emulator

[android-developers] Re: Problem on creating Socket

2009-03-27 Thread ndefo arnauld
hi, please, it is possible to use a socket a android emulator to my own remote server???if yes how can i doplease i need your helm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post

[android-developers] Re: Problem on creating Socket

2009-03-24 Thread guishenl...@gmail.com
Thanks for your help, Dillirao! I have made it work! Here is my final code which can response within 10 seconds: try{ Socket netSocket = null; SOCKET_TIMEOUT = 1; InetSocketAddress myAddress = new InetSocketAddress("10.0.2.2", 9001 ); netSocket = new

[android-developers] Re: Problem on creating Socket

2009-03-24 Thread dillirao malipeddi
int SOCKET_TIMEOUT = 1; //10 sec InetSocketAddress myAddRess = new InetSocketAddress(url_connect,port ); //InetSocketAddress(InetAddress address, int port) try { //1. creating a socket to connect to the server Log.i("connecting to :"+url_connect+"]"," at port ["+port+"]"); //