QNetworkAccessManager/QNetworkReply with custom QTcpSocket?

北城余情 提交于 2020-01-04 07:19:09

问题


Is there any way to replace QSslSocket used by QNetworkAccessManager with my own implementation?

I was really looking forward to use WebKit!!

I'm working on attaching PKCS11 implementation to our Qt based software.

So far the only way I found is to use QHttp - but doc says that this class should not be used..

I find QNetworkAccessManager very limiting so far. Yes its simple - but it is not the point of this framework.

???


回答1:


You cannot right now replace the QSslSocket inside the HTTP implementation. The only thing you could do is override createRrequest of your QNAM and completely override the HTTP implementation.

What exactly needs to be done to use PKCS11? Would you need to modify some code in src/network/ssl/qsslsocket* and change the SSLContext? Or does the HTTP layer also need change?



来源:https://stackoverflow.com/questions/2015002/qnetworkaccessmanager-qnetworkreply-with-custom-qtcpsocket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!