title: How to do Java tcp client <-> Qt tcp server socket communication
body: <p>What I want to know is if this is a good way to do this, or if there's another better and optimal one. (This is for a local network only, not Internet)</p>
  
  <p>I'm trying to implement a communication system between a tcp <strong>server</strong> (written in <strong>Qt</strong> in windows) and a tcp <strong>client</strong> (written in <strong>java</strong> in android) using sockets. This is </p>
  
  <p>I need to basically do two things: transfer files, and transfer some data.</p>
  
  <ul>
  <li><p>So, I've decided to use a string based communication method to handle
  the custom protocol.</p></li>
  <li><p>For the data transfer, I've tought to create a xml file with the data
  (convert the collections to xml markers and set its values), send the
  file, and then parse it in the other point.</p></li>
  </ul>
  
  <p>I have not much knowledge in network programming so please give me a hand on this.
  Thank you.</p>