Added some comments and changed the case of some member functions.
Since QAbstractSocket::waitForReadyRead isn't thread safe the
application has been changed to handle both client and server connection
in the same thread.