After I've called QSslSocket::startServerEncryption()
, can I proceed to immediately use the socket as an ordinary QTcpSocket, reading and writing data from it, or do I need to call waitForStartEncrypted()
before using it?
socket->startServerEncryption();
socket->waitForEncrypted(); // <==== Is this line necessary?
socket->write(data);
QByteArray response = socket->read();