[Qt-interest] Broken buffer in QSslSocket?

Thiago Macieira thiago.macieira at trolltech.com
Mon Mar 30 21:47:18 CEST 2009


Bastian Bense wrote:
>This is where the problem comes in. After the first attempt to read
>the data from the socket, the socket does not keep receiving and gets
>stuck. A quick check reveals that bytesAvailable() returns 0 [sounds
>good], but encryptedBytesAvailable() returns 1024 [doesn't sound so
>good]. I figure that as long there is some data remaining in the
>socket's incoming buffer, the socket won't receive any further data
>over the network.
>
>I made a little test case to explain my point and reported a bug to
>Nokia already, but it would be nice to know if there is a workaround
>for this (possibly there is a minimum size for setReadBufferSize() or
>something similar)?

We discussed on IRC and yes this is a bug.

The workaround we found is to call flush() after readAll().

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090330/0c5e64ff/attachment.bin 


More information about the Qt-interest-old mailing list