Hi guys,
I have a problem with the QSslSocket.
When I sent data by the write() function of QSslSocket to an already encrypted connection, the functions returns me exactly the size of the QByteArray I give to the function. So far so good, everything as expected.

The amount of data is around 66000 bytes in that QByteArray. Sometimes it happens, that the signal EncryptedBytesWritten() is emitted twice, because the whole data wasn´t encrypted/sent yet. I want to detect when the whole data is transmitted and therefore I´ve tried to store the initial number of bytes and subtract the written bytes in the slot (for the encryptedBytesWritten signal) every time it is called. But unfortunately is the total number of bytes written larger than the size of the QByteArray which was given to the QSslSocket::write() function.
Is there any reason why the numbers differ? Are more bytes written because of some encryption overhead? Can the number of bytes written be calculated on the size of the QByteArray (for all encryption variants which QSslSocket / openSsl offers)?
Is there maybe another solution how to determine, that all data given to the QSslSocket::write function was sent? I´ve already played around with the functions "encryptedBytesToWrite()" and "bytesToWrite" of the QSslSOcket, but with no success.

FYI: With QTcpSocket everything works as expected and the number of written bytes is always exactly the same as the size of the QByteArray, which I gave to the QTcpSocket::write() function.

I really hope you can help me. Thanks in advance!