[Qt-interest] Subclass QNetworkRequest
Thiago Macieira
thiago at kde.org
Tue Feb 23 08:50:40 CET 2010
Em Terça-feira 23. Fevereiro 2010, às 08.39.38, Markus Goetz escreveu:
> ext Thiago Macieira wrote:
> >> It
> >> doesn't seem to implement QIODevice so I'm not exactly sure how I could
> >> do it, does anyone have any ideas? I was originally using a throttled
> >> QIODevice as the data in the QNetworkAccessManager::post() method which
> >> is OK in Windows but OSX seems to have a much larger buffer size and so
> >> buffering to low speed (~5kB/s) causes the connection to timeout
> >> because the data is not sent until the internal buffer is full. Please
> >> correct me if I'm wrong but that does seem to be the case from my
> >> testing.
>
> Should not happen. The OS should send as soon as it has ~MTU bytes.
Didn't we turn off the Nagle's algorithm in 4.6?
> > Your approach is correct.
> >
> > Your QIODevice must emit readyRead() and supply with enough data to keep
> > the transfer rate limited. There should be no buffering effects on
> > sending data, so if you have a testcase showing it failing on Mac, we'll
> > be interested.
>
> Please note that you must somehow tell the full size of the QIODevice to
> QNAM, e.g. by letting the QIODevice be isSequential()==false and
> returning a proper size().
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100223/1a031e1a/attachment.bin
More information about the Qt-interest-old
mailing list