[Qt-interest] cancel http requests
Jason H
scorp1us at yahoo.com
Thu Aug 25 16:14:00 CEST 2011
Wouldn't it be better to just not request them?
I could think of a couple ways to cut down on the traffic:
Using events: A timer, a widget enter/leave event, a dead-band (must move 2px), or wait for the mouse to stop moving.
If you use http 1.1 you could just ignore all responses but the one matching the last request. Though that won't reduce load on the server.
________________________________
From: Sergey <sh0375 at gmail.com>
To: qt-interest at qt.nokia.com
Sent: Thursday, August 25, 2011 8:55 AM
Subject: [Qt-interest] cancel http requests
Hello,
I have QT program, which sends requests to web service using
qtsoap-2.7_1 each time, when mouse cursor changes position to receive
information about place under mouse position.
qtsoap-2.7_1 uses QHttp for serving http communications.
If mouse is moved over area, several requests are sent to server (for
different positions).
And several http answers are received.
I need information only for position under current cursor position.
So a lot of http requests, which were sent for old mouse positions, are
unneeded and ignored, when received. Web Server spends its resources to
serve all these unneeded requests.
Is it possible to cancel some of previous http requests on the client
side, so that server would not serve them?
--
Thanks!
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110825/10308d9a/attachment.html
More information about the Qt-interest-old
mailing list