QNetworkAccessManager/QNetworkReply 与自定义 QTcpSocket? [英] QNetworkAccessManager/QNetworkReply with custom QTcpSocket?

查看:47
本文介绍了QNetworkAccessManager/QNetworkReply 与自定义 QTcpSocket?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以用我自己的实现替换 QNetworkAccessManager 使用的 QSslSocket 吗?

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

我真的很期待使用 WebKit!!

I was really looking forward to use WebKit!!

我正在努力将 PKCS11 实现附加到我们基于 Qt 的软件中.

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

到目前为止,我发现的唯一方法是使用 QHttp - 但文档说不应使用此类..

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

我发现 QNetworkAccessManager 到目前为止非常有限.是的,它很简单 - 但这不是这个框架的重点.

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

???

推荐答案

您现在无法替换 HTTP 实现中的 QSslSocket.您唯一能做的就是覆盖 QNAM 的 createRrequest 并完全覆盖 HTTP 实现.

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.

使用 PKCS11 到底需要做什么?您是否需要修改 src/network/ssl/qsslsocket* 中的一些代码并更改 SSLContext?还是HTTP层也需要改变?

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?

这篇关于QNetworkAccessManager/QNetworkReply 与自定义 QTcpSocket?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆