How to create custom QTcpSocket class in QNetworkAccessManager?
I want to write a simple client-server application, which will be communicate using HTTP protocol. It will be a simple http web server with QTcpServer and simple Web Browser with QWebView and QTcpSocket. This application will have two thread in one process. One thread for server and one thread for client. Client will communicate with server using HTTP protocol. In this case, communication between server and client (using HTTP) takes place via a network.
I want to organize communication (using HTTP) between server and client, was via some inter process communication (IPC). For example dbus or any. Because HTTP is a text protocol, and we can send text data to server via network or dbus or any IPC. I want to organize HTTP communication via IPC for my application, because I work on the computer where I have not a root permissions, and closed all unused ports and interfaces (including loop back). If QNetworkAccessManager uses network for HTTP requests, it is clear to me.
Is it possible in QT framework create MyCustomQTcpSocket which will be inherited from QTcpSocket class? And MyCustomQTcpSocket will be write data into dbus (or any IPC) instead of TCP socket
I think if we can create custom (for example MyQNetworkAccessManager) QNetworkAccessManager and after assign MyQNetworkAccessManager for QWebView then we can create custom (for example MyCustomQTcpSocket) QTcpSocket and assign MyCustomQTcpSocket for MyQNetworkAccessManager.
I know that we can create custom MyQNetworkAccessManager from QNetworkAccessManager and make realization our own createRequest method, but if do this, than we need also create own realization of QNetworkReply class, own realization of slots and signals and other dependencies.
If we create custom QTcpSocket class, we will be able to redirect text data from network to dbus (or any IPC) and we will be able to decrease own realization of dependencies (like own QNetworkReply, signals, slots).