title: TCP connection Socket.getInputStream()
body: <p>I created an application which establishes connection with the given port and transport data either ways. But I am having issues in reading the data from the server.</p>
  
  <pre><code>try{
  
      Socket skt = new Socket(127.98.68.11, 1111); // connecting to this to get data
  
      String message = "some test message";
  
      if(option.equalsIgnoreCase("send")){
  
           OutputStream outToServer = skt.getOutputStream();
            outToServer.write(message); // this is working, message stored on server-side
      }else if(option.equalsIgnoreCase("receive")){
            BufferedReader in = new BufferedReader (new InputStreamReader(sit.getInputStream()));
  
            String fromServer = in.readLine();
            System.Out.Println(fromServer);
      }
  
  }catch(IOException io){
     io.printStackTrace();
  }
  </code></pre>
  
  <p>In this program everything is working as expected. except in.readline().</p>
  
  <p>I tried running this program in debugging mode, and the by the time compiler reaches this command. is was doing nothing and i can't see the cursor also</p>