Request for Advice - Is QNetworkAccessManager appropriate for a high performance scenario?

  • Hello,

    I am hoping Qt experts can give guidance on the following application I would like to build using the Qt framework.

    I am working on a networked Qt application where I will be performing the following:

    An OpenGL Graphics Pipeline/Output via QWindow+QOpenGLFunctions

    Capturing of proprietary hardware device data (via C++ and hardware device API)

    Processing of proprietary hardware device data with OpenGL engine mentioned in first step

    Web Camera and audio capture & processing via QT multimedia platform

    Processing and compression of data for transmission and reception with networking API (Using QT or other platform).

    So, what I am worried about is the section in bold.

    Essentially the question is if QNetworkAccessManager is designed in such a way where it can operate in a client and server fashion or is it just for sending and receiving web requests.

    QNetworkAccessManager works really well for my needs with JSON posting/receiving as well as file downloads but can it also be used for a high performance application where I am streaming large amounts of compressed audio/video AND sending/receiving application data in real time?

    If not, may you recommend either aqnother QT object/api? Or a library that can work well with QT?

    Thank you for your time and attention on this request for advice.

  • Hi,

    QNetworkAccessManager is NOT designed to be used as an HTTP server. It supports client-side HTTP and FTP requests.

    Do you streaming audio/video data over HTTP? If not, I'd suggest that you use QTcpSocket. If you can give up some reliability, you can also use QUdpSocket, which would probably be faster than QTcpSocket.

  • Hello,

    Thanks for the reply. I'd like to use the QUdpSocket for the audio/video streams and QTcpSocket for the program data and application synchronization.

    Perhaps I'll also use QNetworkManager to send/receive data to the web cloud stack we are developing for this application as well.

    Thank you for the suggestion!

    Other suggestions are welcome.

  • One more thing: If you are only using Windows machines both on the sending and receiving end, you can also use QLocalSocket. I don't have any speed comparison with QtTcpSocket but it may be a tad faster than a TCP connection.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.