PDA

View Full Version : QNetworkAccessManager/QNetworkReply with custom QTcpSocket?



buble
6th January 2010, 18:27
Hi

Is there any way to replace SslSocket 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.



???

wysota
9th January 2010, 00:08
Not really as each request uses its own socket. You'd have to subclass QNetworkAccessManager and reimplement QNetworkAccessManager::createRequest() but then you'd have to implement virtually everything yourself.

buble
9th January 2010, 03:03
Thanks for response.

Yes
I've reached the same conclusion.
Looks like overriding QNetworkAccessManager/QNetworkReply is the only way. Then inside QNetworkReply - QHttp can be used, as it exposes setSocket.
For everyone who will face the same task -read this post: http://lists.trolltech.com/qt-interest/2008-11/thread00002-0.html