Problem receiving Socket stream data :(

Hello,

I'm new to Android programming. It doesn't seems to be so extremely hard but I'm stock on a method receiving data from a tcp server.

  1. try {
  2.                
  3.             Socket s = new Socket("127.0.0.1",8810);
  4.  
  5.             OutputStream out = s.getOutputStream();
  6.             PrintWriter output = new PrintWriter(out);
  7.            
  8.             output.println("[STATUS]");
  9.            
  10.             BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream()));
  11.            
  12.  
  13.              String resultat = input.readLine();
  14.            
  15.             s.close();          
  16.            
  17.         } catch (UnknownHostException e) {
  18.                 // TODO Auto-generated catch block
  19.                 //e.printStackTrace();
  20.             Log.i("TcpUdataFel",e.toString());
  21.                    
  22.         } catch (IOException e) {
  23.                 // TODO Auto-generated catch block
  24.                 //e.printStackTrace();
  25.             Log.i("TcpUdataFel",e.toString());
  26.         } catch (Exception e){
  27.                 Log.i("TcpUdataFel",e.toString());
  28.         }

for some reason i don't get any input. The applications hangs. At least running on emulator.
I have tried with several different servers and ports with similar results.
Applications hangs receiving data.

What can it be?

Hope you can help me move forward :)

Best regards!