title: android socket connection, inputStream freezing on readline with socket.io or node websocket server
body: <p>im using <a href="http://code.google.com/p/guava-libraries/" rel="nofollow noreferrer">guava</a> and <a href="http://code.google.com/p/weberknecht/" rel="nofollow noreferrer">weberknecht</a> to convert an inputStream to a string and connect to a websocket [see <a href="https://stackoverflow.com/questions/6499543/android-to-node-js-communication">this</a> post]. Weberknecht threw me out, so im trying a very simple Socket-Connection to get any answer from the server. The Problem is, i can't read the inputStream. I don't know why.</p>
  
  <p>NOTE:
  On Iphone the Websocket-Server works. [i know "websocket /= socket" ... im just trying everything here to get ANY answer from the server]</p>
  
  <p>My code:</p>
  
  <pre><code>        try {
              Socket sock = new Socket("62.212.88.234", 15000);
              OutputStream out = sock.getOutputStream();
              InputStream in = sock.getInputStream();
  
              Log.e("SKT", "Reading input [! PROBLEM HERE !]");
              String string = CharStreams.toString(new InputStreamReader(in,
                      "UTF-8"));
  
              Log.e("SKT", "Answer [! NEVER REACHED !]:" + string);
              sock.close();
  
          } catch (UnknownHostException e) {
              Log.e("SKT", "UnknownHostException: " + e.getMessage());
          } catch (IOException e) {
              Log.e("SKT", "IOException: " + e.getMessage());
          }
  </code></pre>
  
  <p>Thanks for the Help in advance.</p>