title: BufferedReader not reading data but shows value in debug mode
body: <p>I have implemented Socket for a multiplayer game using libGdx.</p>
  
  <p>Client side </p>
  
  <pre><code> private void startClient(String ip, int port) {
          SocketHints socketHints = new SocketHints();
          // Socket will time our in 4 seconds
          socketHints.connectTimeout = 4000;
          //create the socket and connect to the server entered in the text box ( x.x.x.x format ) on port 9021
          Socket socket = Gdx.net.newClientSocket(Net.Protocol.TCP, ip, port, 
  socketHints);
          try {
              System.out.println("JoinScreen.startClient");
              // write our entered message to the stream
              OutputStream out = socket.getOutputStream();
              out.write("testtest shine \n".getBytes());
              out.flush();
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>Server code</p>
  
  <pre><code>  private void startThreadServer() {
          new Thread(new Runnable() {
  
              @Override
              public void run() {
                  System.out.println("HotspotHomeScreen.run");
                  ServerSocketHints serverSocketHint = new ServerSocketHints();
  
                  serverSocketHint.acceptTimeout = 0;
  
  
                  ServerSocket serverSocket = Gdx.net.newServerSocket(Net.Protocol.TCP, mPort, serverSocketHint);
                  String messageStr = null;
  
                  while (true) {
                      // Create a socket
                      Socket socket = serverSocket.accept(null);
                      System.out.println("while true");
                      int value = 0;
                      BufferedReader buffer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                      try {
                          while ((value = buffer.read()) != -1) {
                              char c = (char) value;
                              if (value != 0 &amp;&amp; value != 155)
                                  messageStr = messageStr + c;
                              // Read to the next newline (\n) and display that text on labelMessage
                              System.out.println("HotspotHomeScreen.run  " + buffer.readLine());
                              System.out.println("test messageStr = " + messageStr);
                          }
  
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
                      System.out.println("testnjnihg test" + messageStr);
                      System.out.println("HostScreen last line");
                  }
              }
          }).start(); // And, start the thread running
      }
  </code></pre>
  
  <p>The BufferedReader is invoked after starting the server on one device,but data cannot read. When I switch to debug mode, after reaching  <code>while ((value = buffer.read()) != -1) {</code> the buffer shows all the data I sent in the debugger console,but the execution stops there. Sorry for my bad Language</p>