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

A way to set custom socket in QNetworkAccessManager

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 4.7.4
    • Network
    • None

    Description

      QHttp has setSocket, which is quite handy when we need todo some additional job on http traffic or when we need to initiate connection in some special way.
      but it seems QHttp is deprecated (documentation doesn't say so, but eceryone else do) and its
      recommended to use QNetworkAccessManager instead.

      QNetworkAccessManager has no a way to set custom socket for http requests, so its always
      plain QTcpSocket or QSslSocket and thus its impossible to do some custom job on socket.

      providing asynchronous external socket factory would be a good solution for me.
      asynchronous because it may be required to initiate custom socket before returning it to qnam and we don't want blocking.

      I googled a bit and it seems this feature requested not only by me and I can try to implement this.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            rion Rion
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes