title: Sending TCP data from Android (as client) - no data being sent?
body: <p>I'm trying to send data from my Android app to my PC over TCP.</p>
  
  <p>The code is as follows:</p>
  
  <pre><code>Socket socket = new Socket("10.0.78.75", 50505);   
  
  OutputStream out = socket.getOutputStream();       
  PrintWriter output = new PrintWriter(out);         
  
  mStatusText.setText("Sending Data to PC");         
  output.println("Hello from Android");              
  mStatusText.setText("Data sent to PC");            
  
  socket.close();                                    
  mStatusText.setText("Socket closed");              
  </code></pre>
  
  <p>I don't get any errors at all while doing this, however, the server application (written in C#) does not get any data.
  It sees the client connect to it, and sees that data is being sent, however, the data string comes out empty... And thoughts on why this is happening?</p>
  
  <p>PS: The server code is copied from the following site and has been tested with a C# TCP client.
  <a href="http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server" rel="noreferrer">http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server</a></p>