Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12556

QNetworkAccessManager should provide a signal when connection slots are available

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 4.6.3
    • Network
    • None

      My application makes a series of hundreds of GET requests for small subranges (~20k) of a set of large files (20Gb) on the same host using HTTP's Range header. My data is hosted on Amazon S3, so there is a monetary cost for each GET request, and I'd like to combine adjacent requests wherever possible.

      Ideally I'd like to do the following:

      • Keep a queue of pending requests in my code
      • Whenever I want to make a new request, add it to my own queue, merging it with any adjacent requests.
      • Whenever my QNetworkAccessManager instance is ready to make a new HTTP request, submit a new request from the queue.

      Unfortunately, since QNetworkAccessManager doesn't provide any notification about whether it has connection slots available, nor even how many slots might exist, I can only guess when to submit new requests to the manager. I can either submit them too early, in which case I might miss opportunities for merging requests, or too late, in which the connection might sit idle.

      Would it be possible to add a signal emitted when a QNetworkAccessManager has an available TCP connection or an idle pipelined connection? Alternatively could QNetworkAccessManager provide a function that identifies the number of simultaneous connections it is willing to make to each host/port combination so my code knows how many requests to try to keep in flight at any given time?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            peterh Peter Hawkins
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes