Change to use QTcpSocket