PDA

View Full Version : Options for detecting if https (port 443) is blocked



Berryblue031
30th August 2011, 08:05
My program uses https: but in the situation when the https port (443) is blocked by a firewall for example, I would like to simply switch to using regular http (port 80)

My question is how can I detect when the port isn't available?

Waiting for requests to simply timeout takes to long, and I can't find any thing for manually defining the network timeout duration except for other people requesting the functionality (https://bugreports.qt.nokia.com/browse/QTBUG-3443).

Is there any way for me to do this?

The only possible solution I can think of is running my own timer and declaring timeout when it expires instead of waiting for the qnetworkreply to actually return, and well that's an ugly hack imo so I was hoping not to have to do it.

wysota
30th August 2011, 08:16
No, you can't do that in a reliable way.