[Qt-interest] QSslSocket: massive difference in app memory usage when encryption enabled
Stephen Collyer
scollyer at netspinner.co.uk
Thu Oct 15 11:18:41 CEST 2009
2009/10/14 Markus Goetz <Markus.Goetz at nokia.com>
> ext Stephen Collyer wrote:
>
>>
>> Does anyone have any insight into what's going on here ?
>>
> Yes, Maybe.
>
> 1. With a QSslSocket, you'd have to check encryptedBytesToWrite() since
> those are the bytes going out on the actual TCP socket. So, to be on the
> safe side do check for (encryptedBytesToWrite() + bytesToWrite() <
> http_socket_buffer_length_)
>
> 2. You should also connect encryptedBytesWritten() signal to your
> emit_file_chunk.
>
> I hope that helps! If yes/no, please report back:)
> Markus
>
Markus
Thanks for the response. I'll try your suggested changes and let you know
what happens.
There's one point that I'm not clear about: I use QSslSocket in both
encrypted and unencrypted mode, and I only see the problem with encrypted
mode. So I need a solution that works in both cases. However, I assume that
encryptedBytesWritten() is only emitted for a QSslSocket in encrypted mode -
if so, I guess I'd need an ugly hack to connect the encryptedBytesWritten()
or bytesWritten() based on whether the socket is encrypted or not.
Is that right ?
--
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091015/64c4cc84/attachment.html
More information about the Qt-interest-old
mailing list