Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetworkAccessManager and HTTP persistent connection
Qt 6.11 is out! See what's new in the release blog

QNetworkAccessManager and HTTP persistent connection

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    redstoneleo
    wrote on last edited by
    #1

    HTTP 1.1 supports persistent connection by default, so I want to send my a second http request using the same connection that was setup when the first HTTP request was made. how can this be achieved through Qt?

    If I simply make the second request after the first one finished like the following
    @
    manager->get(QNetworkRequest(QUrl("http://qt-project.org")));
    @
    it seems a new TCP connection to the server will be initiated (I have checked with a network sniffer)

    The experiment also says: If the reply is deleteLater() or abort() within
    finished() signal, the connection will be closed.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved