![]() |
Qt 6.x
The Qt SDK
|
#include <qhttpnetworkconnectionchannel_p.h>
Public Types | |
enum | ChannelState { IdleState = 0 , ConnectingState = 1 , WritingState = 2 , WaitingState = 4 , ReadingState = 8 , ClosingState = 16 , BusyState = (ConnectingState|WritingState|WaitingState|ReadingState|ClosingState) } |
enum | PipeliningSupport { PipeliningSupportUnknown , PipeliningProbablySupported , PipeliningNotSupported } |
Public Member Functions | |
void | ignoreSslErrors () |
void | ignoreSslErrors (const QList< QSslError > &errors) |
void | setSslConfiguration (const QSslConfiguration &config) |
void | requeueHttp2Requests () |
void | emitFinishedWithError (QNetworkReply::NetworkError error, const char *message) |
void | pipelineInto (HttpMessagePair &pair) |
void | pipelineFlush () |
void | requeueCurrentlyPipelinedRequests () |
void | detectPipeliningSupport () |
QHttpNetworkConnectionChannel () | |
void | setConnection (QHttpNetworkConnection *c) |
void | setProxy (const QNetworkProxy &networkProxy) |
void | init () |
void | close () |
void | abort () |
bool | sendRequest () |
void | sendRequestDelayed () |
bool | ensureConnection () |
void | allDone () |
void | handleStatus () |
bool | resetUploadData () |
void | handleUnexpectedEOF () |
void | closeAndResendCurrentRequest () |
void | resendCurrentRequest () |
bool | isSocketBusy () const |
bool | isSocketWriting () const |
bool | isSocketWaiting () const |
bool | isSocketReading () const |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Protected Slots | |
void | _q_receiveReply () |
void | _q_bytesWritten (qint64 bytes) |
void | _q_readyRead () |
void | _q_disconnected () |
void | _q_connected () |
void | _q_error (QAbstractSocket::SocketError) |
void | _q_proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *auth) |
void | _q_uploadDataReadyRead () |
void | _q_encrypted () |
void | _q_sslErrors (const QList< QSslError > &errors) |
void | _q_preSharedKeyAuthenticationRequired (QSslPreSharedKeyAuthenticator *) |
void | _q_encryptedBytesWritten (qint64 bytes) |
Friends | |
class | QHttpProtocolHandler |
Additional Inherited Members | |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
QString | objectName |
the name of this object | |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 59 of file qhttpnetworkconnectionchannel_p.h.
Enumerator | |
---|---|
IdleState | |
ConnectingState | |
WritingState | |
WaitingState | |
ReadingState | |
ClosingState | |
BusyState |
Definition at line 64 of file qhttpnetworkconnectionchannel_p.h.
Enumerator | |
---|---|
PipeliningSupportUnknown | |
PipeliningProbablySupported | |
PipeliningNotSupported |
Definition at line 105 of file qhttpnetworkconnectionchannel_p.h.
QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel | ( | ) |
Definition at line 50 of file qhttpnetworkconnectionchannel.cpp.
Definition at line 798 of file qhttpnetworkconnectionchannel.cpp.
References isSocketWriting(), Q_UNUSED, sendRequest(), and ssl.
Referenced by init().
|
protectedslot |
Definition at line 842 of file qhttpnetworkconnectionchannel.cpp.
References QAbstractSocket::AnyIPProtocol, Http2::appendProtocolUpgradeHeaders(), close(), connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, h2RequestsToSend, QHttpNetworkConnectionPrivate::HostLookupPending, QHttpNetworkConnection::http2Parameters(), IdleState, QMetaObject::invokeMethod(), QHttpNetworkConnectionPrivate::IPv4, QHttpNetworkConnectionPrivate::IPv4or6, QAbstractSocket::IPv4Protocol, QHttpNetworkConnectionPrivate::IPv6, QAbstractSocket::IPv6Protocol, QNetworkConnectionMonitor::isEnabled(), QAbstractSocket::KeepAliveOption, QAbstractSocket::localAddress(), networkLayerPreference, QAbstractSocket::peerAddress(), pendingEncrypt, pipeliningSupported, PipeliningSupportUnknown, QHostAddress::protocol(), protocolHandler, QHttpProtocolHandler, Qt::QueuedConnection, reply, request, sendRequest(), QAbstractSocket::setSocketOption(), QHttpNetworkConnection::setSslContext(), QMultiMap< Key, T >::size(), socket, ssl, QHttpNetworkConnection::sslContext(), QSslSocketPrivate::sslContext(), state, and switchedToHttp2.
Referenced by init().
|
protectedslot |
Definition at line 813 of file qhttpnetworkconnectionchannel.cpp.
References _q_receiveReply(), alreadyPipelinedRequests, QAbstractSocket::bytesAvailable(), ClosingState, connection, IdleState, QMetaObject::invokeMethod(), isSocketReading(), isSocketWaiting(), pendingEncrypt, Qt::QueuedConnection, ReadingState, reply, requeueCurrentlyPipelinedRequests(), resendCurrent, QList< T >::size(), socket, and state.
Referenced by init().
|
protectedslot |
Definition at line 1164 of file qhttpnetworkconnectionchannel.cpp.
References QSslConfiguration::allowedNextProtocols(), QSslConfiguration::ALPNProtocolHTTP2, QHttpNetworkConnection::channels(), connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, emit, emitFinishedWithError(), QHttpNetworkReply::encrypted(), QList< T >::first(), h2RequestsToSend, i, IdleState, QMetaObject::invokeMethod(), QSslConfiguration::nextNegotiatedProtocol(), QSslConfiguration::NextProtocolHttp1_1, QSslConfiguration::NextProtocolNegotiationNegotiated, QSslConfiguration::NextProtocolNegotiationNone, QSslConfiguration::nextProtocolNegotiationStatus(), QSslConfiguration::NextProtocolNegotiationUnsupported, pendingEncrypt, protocolHandler, Q_ASSERT, Q_FALLTHROUGH, QHttpProtocolHandler, Qt::QueuedConnection, QList< T >::removeAll(), reply, requeueHttp2Requests(), sendRequestDelayed(), QSslConfiguration::setAllowedNextProtocols(), QHttpNetworkConnection::setConnectionType(), QHttpNetworkReply::setHttp2WasUsed(), setSslConfiguration(), QMultiMap< Key, T >::size(), QList< T >::size(), socket, QSslSocket::sslConfiguration(), QNetworkReply::SslHandshakeFailedError, state, switchedToHttp2, and QMultiMap< Key, T >::values().
Referenced by init().
Definition at line 1319 of file qhttpnetworkconnectionchannel.cpp.
References isSocketWriting(), Q_UNUSED, and sendRequest().
Referenced by init().
|
protectedslot |
Definition at line 940 of file qhttpnetworkconnectionchannel.cpp.
References _q_receiveReply(), QList< T >::at(), QAbstractSocket::bytesAvailable(), QMultiMap< Key, T >::clear(), ClosingState, connection, QNetworkReply::ConnectionRefusedError, QAbstractSocket::ConnectionRefusedError, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, QHttpNetworkReply::contentLength(), emit, QIODevice::errorString(), QHttpNetworkReply::errorString(), QHttpNetworkReply::finishedWithError(), h2RequestsToSend, QHttp2ProtocolHandler::handleConnectionClosure(), QNetworkReply::HostNotFoundError, QAbstractSocket::HostNotFoundError, IdleState, QMetaObject::invokeMethod(), QNetworkProxy::NoProxy, pendingEncrypt, protocolHandler, QNetworkReply::ProxyAuthenticationRequiredError, QAbstractSocket::ProxyAuthenticationRequiredError, QNetworkReply::ProxyConnectionClosedError, QAbstractSocket::ProxyConnectionClosedError, QNetworkReply::ProxyConnectionRefusedError, QAbstractSocket::ProxyConnectionRefusedError, QAbstractSocket::ProxyConnectionTimeoutError, QNetworkReply::ProxyTimeoutError, Q_ASSERT, Qt::QueuedConnection, ReadingState, reconnectAttempts, QNetworkReply::RemoteHostClosedError, QAbstractSocket::RemoteHostClosedError, reply, requeueCurrentlyPipelinedRequests(), resendCurrentRequest(), QHttpNetworkReply::setDownstreamLimited(), QHttpNetworkReply::setReadBufferSize(), QList< T >::size(), socket, QAbstractSocket::SocketTimeoutError, ssl, QNetworkReply::SslHandshakeFailedError, QAbstractSocket::SslHandshakeFailedError, state, QAbstractSocket::state(), switchedToHttp2, QNetworkReply::TimeoutError, QAbstractSocket::UnconnectedState, QNetworkReply::UnknownNetworkError, QMultiMap< Key, T >::values(), and WritingState.
Referenced by QHttpProtocolHandler::_q_readyRead(), and init().
|
protectedslot |
Definition at line 1296 of file qhttpnetworkconnectionchannel.cpp.
References QList< T >::at(), authenticator, connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, emit, h2RequestsToSend, pendingEncrypt, QHttpNetworkReply::preSharedKeyAuthenticationRequired(), Q_ASSERT, reply, QList< T >::size(), socket, and QMultiMap< Key, T >::values().
Referenced by init().
|
protectedslot |
Definition at line 1127 of file qhttpnetworkconnectionchannel.cpp.
References connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, h2RequestsToSend, proxy, reply, QMultiMap< Key, T >::size(), socket, and switchedToHttp2.
Referenced by init().
|
protectedslot |
Definition at line 236 of file qhttpnetworkconnectionchannel.cpp.
References protocolHandler, and Q_ASSERT.
Referenced by init().
|
protectedslot |
Definition at line 230 of file qhttpnetworkconnectionchannel.cpp.
References protocolHandler, and Q_ASSERT.
Referenced by _q_disconnected(), and _q_error().
Definition at line 1268 of file qhttpnetworkconnectionchannel.cpp.
References QList< T >::at(), connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, emit, h2RequestsToSend, pendingEncrypt, Q_ASSERT, reply, QList< T >::size(), socket, QHttpNetworkReply::sslErrors(), and QMultiMap< Key, T >::values().
Referenced by init().
|
protectedslot |
Definition at line 1144 of file qhttpnetworkconnectionchannel.cpp.
References reply, and sendRequest().
void QHttpNetworkConnectionChannel::abort | ( | ) |
Definition at line 189 of file qhttpnetworkconnectionchannel.cpp.
References QAbstractSocket::abort(), ClosingState, IdleState, pendingEncrypt, socket, state, QAbstractSocket::state(), and QAbstractSocket::UnconnectedState.
Referenced by QHttpNetworkConnectionPrivate::removeReply().
void QHttpNetworkConnectionChannel::allDone | ( | ) |
Definition at line 422 of file qhttpnetworkconnectionchannel.cpp.
References alreadyPipelinedRequests, QAbstractSocket::bytesAvailable(), bytesTotal, close(), ClosingState, QAbstractSocket::ConnectedState, connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, QHttpNetworkConnection::ConnectionTypeHTTP2, detectPipeliningSupport(), QHttpNetworkConnection::fillHttp2Queue(), handleStatus(), IdleState, QMetaObject::invokeMethod(), Http2::is_protocol_upgraded(), QList< T >::isEmpty(), protocolHandler, Q_ASSERT, Q_UNUSED, Qt::QueuedConnection, qWarning, ReadingState, reconnectAttempts, reconnectAttemptsDefault, reply, request, requeueCurrentlyPipelinedRequests(), resendCurrent, QHttpNetworkConnection::setConnectionType(), socket, ssl, state, QAbstractSocket::state(), switchedToHttp2, QList< T >::takeFirst(), QAbstractSocket::UnconnectedState, and written.
Referenced by QHttpProtocolHandler::_q_receiveReply(), and QHttpProtocolHandler::sendRequest().
void QHttpNetworkConnectionChannel::close | ( | ) |
Definition at line 166 of file qhttpnetworkconnectionchannel.cpp.
References QAbstractSocket::close(), ClosingState, IdleState, pendingEncrypt, socket, state, QAbstractSocket::state(), and QAbstractSocket::UnconnectedState.
Referenced by _q_connected(), QHttp2ProtocolHandler::_q_receiveReply(), QHttpProtocolHandler::_q_receiveReply(), allDone(), closeAndResendCurrentRequest(), QHttpNetworkConnectionPrivate::emitReplyError(), handleStatus(), handleUnexpectedEOF(), QHttpNetworkConnectionPrivate::networkLayerDetected(), QHttpNetworkConnectionPrivate::removeReply(), and QHttpNetworkConnectionPrivate::shouldEmitChannelError().
void QHttpNetworkConnectionChannel::closeAndResendCurrentRequest | ( | ) |
Definition at line 759 of file qhttpnetworkconnectionchannel.cpp.
References close(), connection, QMetaObject::invokeMethod(), Qt::QueuedConnection, reply, requeueCurrentlyPipelinedRequests(), and resendCurrent.
Referenced by handleStatus(), and handleUnexpectedEOF().
void QHttpNetworkConnectionChannel::detectPipeliningSupport | ( | ) |
Definition at line 546 of file qhttpnetworkconnectionchannel.cpp.
References QAbstractSocket::ConnectedState, QByteArray::contains(), QHttpNetworkReply::headerField(), QHttpNetworkReply::majorVersion(), QHttpNetworkReply::minorVersion(), PipeliningProbablySupported, pipeliningSupported, PipeliningSupportUnknown, Q_ASSERT, reply, socket, QByteArray::startsWith(), and QAbstractSocket::state().
Referenced by allDone().
void QHttpNetworkConnectionChannel::emitFinishedWithError | ( | QNetworkReply::NetworkError | error, |
const char * | message | ||
) |
Definition at line 1150 of file qhttpnetworkconnectionchannel.cpp.
References QList< T >::at(), emit, error, QHttpNetworkReply::finishedWithError(), h2RequestsToSend, Q_ASSERT, reply, QList< T >::size(), and QMultiMap< Key, T >::values().
Referenced by _q_encrypted(), and QHttp2ProtocolHandler::sendRequest().
bool QHttpNetworkConnectionChannel::ensureConnection | ( | ) |
Definition at line 266 of file qhttpnetworkconnectionchannel.cpp.
References QList< T >::at(), authenticationCredentialsSent, authenticator, QHttpNetworkConnection::cacheProxy(), QSslSocketPrivate::checkSettingSslContext(), QAbstractSocket::ClosingState, QAbstractSocket::ConnectedState, ConnectingState, QAbstractSocket::ConnectingState, connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, QAbstractSocket::connectToHost(), QSslSocket::connectToHostEncrypted(), QAuthenticator::detach(), QAuthenticatorPrivate::Done, QMultiMap< Key, T >::first(), QAuthenticatorPrivate::getPrivate(), h2RequestsToSend, QHttpNetworkRequest::headerField(), QAbstractSocket::HostLookupState, QHttpNetworkConnection::hostName(), QNetworkProxy::HttpProxy, ignoreAllSslErrors, QSslSocket::ignoreSslErrors(), ignoreSslErrorsList, init(), QMetaObject::invokeMethod(), QUrl::isEmpty(), isInitialized, QIODevice::isOpen(), networkLayerPreference, QNetworkProxy::NoProxy, QHttpNetworkConnection::peerVerifyName(), pendingEncrypt, pipeliningSupported, PipeliningSupportUnknown, QHttpNetworkConnection::port(), priv(), QNetworkReply::ProtocolUnknownError, proxy, QAbstractSocket::proxy(), proxyAuthenticator, proxyCredentialsSent, Qt::QueuedConnection, QIODeviceBase::ReadWrite, reply, request, resendCurrent, QSslSocket::setPeerVerifyName(), QAbstractSocket::setProxy(), QNetworkProxy::setRawHeader(), QAbstractSocket::setReadBufferSize(), QMultiMap< Key, T >::size(), socket, ssl, QHttpNetworkConnection::sslContext(), QAuthenticatorPrivate::Start, state, QAbstractSocket::state(), QHttpNetworkConnection::transparentProxy(), QNetworkProxy::type(), QIODeviceBase::Unbuffered, QAbstractSocket::UnconnectedState, QHttpNetworkRequest::url(), and QMultiMap< Key, T >::values().
Referenced by QHttpNetworkConnectionPrivate::_q_connectDelayedChannel(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), QHttpProtocolHandler::sendRequest(), QHttpNetworkConnectionPrivate::shouldEmitChannelError(), and QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup().
void QHttpNetworkConnectionChannel::handleStatus | ( | ) |
Definition at line 587 of file qhttpnetworkconnectionchannel.cpp.
References alreadyPipelinedRequests, QNetworkReply::AuthenticationRequiredError, close(), closeAndResendCurrentRequest(), connection, emit, QHttpNetworkReply::errorString(), QHttpNetworkReply::finishedWithError(), QHttpNetworkReply::headerChanged(), QMetaObject::invokeMethod(), QList< T >::isEmpty(), QUrl::isValid(), QNetworkReply::ProxyAuthenticationRequiredError, Q_ASSERT, Qt::QueuedConnection, QHttpNetworkReply::readyRead(), reply, resendCurrent, resetUploadData(), QHttpNetworkReply::setRedirectUrl(), socket, and QHttpNetworkReply::statusCode().
Referenced by allDone().
void QHttpNetworkConnectionChannel::handleUnexpectedEOF | ( | ) |
Definition at line 243 of file qhttpnetworkconnectionchannel.cpp.
References close(), closeAndResendCurrentRequest(), connection, QHttpNetworkReply::connection(), emit, QHttpNetworkReply::errorString(), QHttpNetworkReply::finishedWithError(), QMetaObject::invokeMethod(), protocolHandler, Q_ASSERT, Qt::QueuedConnection, reconnectAttempts, QNetworkReply::RemoteHostClosedError, reply, request, requeueCurrentlyPipelinedRequests(), and socket.
Referenced by QHttpProtocolHandler::_q_receiveReply().
void QHttpNetworkConnectionChannel::ignoreSslErrors | ( | ) |
Definition at line 690 of file qhttpnetworkconnectionchannel.cpp.
References ignoreAllSslErrors, ignoreSslErrors(), and socket.
Referenced by ignoreSslErrors(), and ignoreSslErrors().
Definition at line 699 of file qhttpnetworkconnectionchannel.cpp.
References ignoreSslErrors(), ignoreSslErrorsList, and socket.
void QHttpNetworkConnectionChannel::init | ( | ) |
Definition at line 76 of file qhttpnetworkconnectionchannel.cpp.
References _q_bytesWritten(), _q_connected(), _q_disconnected(), _q_encrypted(), _q_encryptedBytesWritten(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_readyRead(), _q_sslErrors(), QObject::connect(), connected, connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QScopedPointer< T, Cleanup >::data(), Qt::DirectConnection, ignoreAllSslErrors, QSslSocket::ignoreSslErrors(), ignoreSslErrorsList, QList< T >::isEmpty(), isInitialized, QSslConfiguration::isNull(), QNetworkProxy::NoProxy, protocolHandler, proxy, QHttpProtocolHandler, QAbstractSocket::setProxy(), QSslSocket::setSslConfiguration(), SIGNAL, SLOT, socket, sslConfiguration, and QNetworkProxy::type().
Referenced by ensureConnection().
bool QHttpNetworkConnectionChannel::isSocketBusy | ( | ) | const |
Definition at line 778 of file qhttpnetworkconnectionchannel.cpp.
bool QHttpNetworkConnectionChannel::isSocketReading | ( | ) | const |
Definition at line 793 of file qhttpnetworkconnectionchannel.cpp.
References ReadingState, and state.
Referenced by _q_disconnected(), and QHttpProtocolHandler::_q_readyRead().
bool QHttpNetworkConnectionChannel::isSocketWaiting | ( | ) | const |
Definition at line 788 of file qhttpnetworkconnectionchannel.cpp.
References state, and WaitingState.
Referenced by _q_disconnected(), and QHttpProtocolHandler::_q_readyRead().
bool QHttpNetworkConnectionChannel::isSocketWriting | ( | ) | const |
Definition at line 783 of file qhttpnetworkconnectionchannel.cpp.
References state, and WritingState.
Referenced by _q_bytesWritten(), and _q_encryptedBytesWritten().
void QHttpNetworkConnectionChannel::pipelineFlush | ( | ) |
Definition at line 744 of file qhttpnetworkconnectionchannel.cpp.
References QByteArray::clear(), QByteArray::isEmpty(), pipeline, socket, and QIODevice::write().
Referenced by QHttpNetworkConnectionPrivate::fillPipeline().
void QHttpNetworkConnectionChannel::pipelineInto | ( | HttpMessagePair & | pair | ) |
Definition at line 720 of file qhttpnetworkconnectionchannel.cpp.
References alreadyPipelinedRequests, QByteArray::append(), QList< T >::append(), QHttpNetworkRequestPrivate::autoDecompress, connection, QHttpNetworkReply::connection(), QHttpNetworkRequestPrivate::header(), QNetworkProxy::NoProxy, pipeline, reply, and request.
void QHttpNetworkConnectionChannel::requeueCurrentlyPipelinedRequests | ( | ) |
Definition at line 574 of file qhttpnetworkconnectionchannel.cpp.
References alreadyPipelinedRequests, QList< T >::at(), QList< T >::clear(), connection, i, QMetaObject::invokeMethod(), Qt::QueuedConnection, and QList< T >::size().
Referenced by _q_disconnected(), _q_error(), allDone(), closeAndResendCurrentRequest(), QHttpNetworkConnectionPrivate::emitReplyError(), handleUnexpectedEOF(), QHttpNetworkConnectionPrivate::removeReply(), and resendCurrentRequest().
void QHttpNetworkConnectionChannel::requeueHttp2Requests | ( | ) |
Definition at line 1260 of file qhttpnetworkconnectionchannel.cpp.
References QList< T >::at(), QMultiMap< Key, T >::clear(), connection, h2RequestsToSend, QList< T >::size(), and QMultiMap< Key, T >::values().
Referenced by _q_encrypted().
void QHttpNetworkConnectionChannel::resendCurrentRequest | ( | ) |
Definition at line 769 of file qhttpnetworkconnectionchannel.cpp.
References connection, QMetaObject::invokeMethod(), Qt::QueuedConnection, reply, requeueCurrentlyPipelinedRequests(), and resendCurrent.
Referenced by _q_error().
bool QHttpNetworkConnectionChannel::resetUploadData | ( | ) |
Definition at line 655 of file qhttpnetworkconnectionchannel.cpp.
References connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2Direct, QNetworkReply::ContentReSendError, reply, request, socket, switchedToHttp2, QHttpNetworkRequest::uploadByteDevice(), and written.
Referenced by handleStatus().
bool QHttpNetworkConnectionChannel::sendRequest | ( | ) |
Definition at line 209 of file qhttpnetworkconnectionchannel.cpp.
References protocolHandler, and Q_ASSERT.
Referenced by _q_bytesWritten(), _q_connected(), _q_encryptedBytesWritten(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), and _q_uploadDataReadyRead().
void QHttpNetworkConnectionChannel::sendRequestDelayed | ( | ) |
Definition at line 221 of file qhttpnetworkconnectionchannel.cpp.
References QMetaObject::invokeMethod(), protocolHandler, Q_ASSERT, Qt::QueuedConnection, and reply.
Referenced by _q_encrypted().
void QHttpNetworkConnectionChannel::setConnection | ( | QHttpNetworkConnection * | c | ) |
Definition at line 1330 of file qhttpnetworkconnectionchannel.cpp.
References connection.
Referenced by QHttpNetworkConnectionPrivate::init().
void QHttpNetworkConnectionChannel::setProxy | ( | const QNetworkProxy & | networkProxy | ) |
Definition at line 678 of file qhttpnetworkconnectionchannel.cpp.
References proxy, QAbstractSocket::setProxy(), and socket.
void QHttpNetworkConnectionChannel::setSslConfiguration | ( | const QSslConfiguration & | config | ) |
Definition at line 707 of file qhttpnetworkconnectionchannel.cpp.
References QScopedPointer< T, Cleanup >::data(), QScopedPointer< T, Cleanup >::reset(), setSslConfiguration(), socket, and sslConfiguration.
Referenced by _q_encrypted(), and setSslConfiguration().
|
friend |
Definition at line 173 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_encrypted(), and init().
QList<HttpMessagePair> QHttpNetworkConnectionChannel::alreadyPipelinedRequests |
Definition at line 111 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_disconnected(), allDone(), QHttpNetworkConnectionPrivate::fillPipeline(), handleStatus(), pipelineInto(), QHttpNetworkConnectionPrivate::removeReply(), and requeueCurrentlyPipelinedRequests().
bool QHttpNetworkConnectionChannel::authenticationCredentialsSent |
Definition at line 87 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), and QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().
QAuthenticator QHttpNetworkConnectionChannel::authenticator |
Definition at line 85 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_preSharedKeyAuthenticationRequired(), QHttpNetworkConnectionPrivate::copyCredentials(), ensureConnection(), QHttpNetworkConnectionPrivate::fillPipeline(), QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(), and QHttpProtocolHandler::sendRequest().
qint64 QHttpNetworkConnectionChannel::bytesTotal |
Definition at line 80 of file qhttpnetworkconnectionchannel_p.h.
Referenced by allDone(), and QHttpProtocolHandler::sendRequest().
QPointer<QHttpNetworkConnection> QHttpNetworkConnectionChannel::connection |
Definition at line 123 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), allDone(), closeAndResendCurrentRequest(), ensureConnection(), handleStatus(), handleUnexpectedEOF(), init(), pipelineInto(), requeueCurrentlyPipelinedRequests(), requeueHttp2Requests(), resendCurrentRequest(), resetUploadData(), and setConnection().
QMultiMap<int, HttpMessagePair> QHttpNetworkConnectionChannel::h2RequestsToSend |
Definition at line 90 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), emitFinishedWithError(), QHttpNetworkConnectionPrivate::emitProxyAuthenticationRequired(), ensureConnection(), QHttpNetworkConnectionPrivate::fillHttp2Queue(), QHttpNetworkConnectionPrivate::queueRequest(), QHttpNetworkConnectionPrivate::removeReply(), requeueHttp2Requests(), and QHttp2ProtocolHandler::sendRequest().
bool QHttpNetworkConnectionChannel::ignoreAllSslErrors |
Definition at line 93 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), ignoreSslErrors(), and init().
Definition at line 94 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), ignoreSslErrors(), and init().
bool QHttpNetworkConnectionChannel::isInitialized |
Definition at line 75 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), and init().
int QHttpNetworkConnectionChannel::lastStatus |
Definition at line 82 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpProtocolHandler::_q_receiveReply().
QAbstractSocket::NetworkLayerProtocol QHttpNetworkConnectionChannel::networkLayerPreference |
bool QHttpNetworkConnectionChannel::pendingEncrypt |
Definition at line 83 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_sslErrors(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), abort(), close(), and ensureConnection().
QByteArray QHttpNetworkConnectionChannel::pipeline |
Definition at line 112 of file qhttpnetworkconnectionchannel_p.h.
Referenced by pipelineFlush(), and pipelineInto().
PipeliningSupport QHttpNetworkConnectionChannel::pipeliningSupported |
Definition at line 110 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), detectPipeliningSupport(), and ensureConnection().
std::unique_ptr<QAbstractProtocolHandler> QHttpNetworkConnectionChannel::protocolHandler |
Definition at line 89 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_encrypted(), _q_error(), _q_readyRead(), _q_receiveReply(), allDone(), QHttpNetworkConnectionPrivate::emitReplyError(), handleUnexpectedEOF(), init(), QHttpNetworkConnectionPrivate::removeReply(), sendRequest(), and sendRequestDelayed().
QNetworkProxy QHttpNetworkConnectionChannel::proxy |
Definition at line 126 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpNetworkConnectionPrivate::_q_hostLookupFinished(), _q_proxyAuthenticationRequired(), ensureConnection(), init(), setProxy(), and QHttpNetworkConnectionPrivate::startHostInfoLookup().
QAuthenticator QHttpNetworkConnectionChannel::proxyAuthenticator |
Definition at line 86 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpNetworkConnectionPrivate::copyCredentials(), ensureConnection(), QHttpNetworkConnectionPrivate::fillPipeline(), and QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().
bool QHttpNetworkConnectionChannel::proxyCredentialsSent |
Definition at line 88 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), and QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().
int QHttpNetworkConnectionChannel::reconnectAttempts |
Definition at line 84 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_error(), allDone(), and handleUnexpectedEOF().
QHttpNetworkReply* QHttpNetworkConnectionChannel::reply |
Definition at line 78 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), _q_uploadDataReadyRead(), allDone(), closeAndResendCurrentRequest(), detectPipeliningSupport(), emitFinishedWithError(), QHttpNetworkConnectionPrivate::emitProxyAuthenticationRequired(), QHttpNetworkConnectionPrivate::emitReplyError(), ensureConnection(), handleStatus(), handleUnexpectedEOF(), pipelineInto(), QHttpNetworkConnectionPrivate::removeReply(), resendCurrentRequest(), resetUploadData(), QHttpProtocolHandler::sendRequest(), sendRequestDelayed(), and QHttpNetworkConnectionPrivate::updateChannel().
QHttpNetworkRequest QHttpNetworkConnectionChannel::request |
Definition at line 77 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), allDone(), QHttpNetworkConnectionPrivate::emitReplyError(), ensureConnection(), handleUnexpectedEOF(), pipelineInto(), QHttpNetworkConnectionPrivate::removeReply(), resetUploadData(), QHttpProtocolHandler::sendRequest(), and QHttpNetworkConnectionPrivate::updateChannel().
bool QHttpNetworkConnectionChannel::resendCurrent |
Definition at line 81 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_disconnected(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), allDone(), closeAndResendCurrentRequest(), ensureConnection(), handleStatus(), QHttpNetworkConnectionPrivate::removeReply(), and resendCurrentRequest().
QAbstractSocket* QHttpNetworkConnectionChannel::socket |
Definition at line 73 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpNetworkConnectionPrivate::~QHttpNetworkConnectionPrivate(), _q_connected(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), abort(), allDone(), close(), detectPipeliningSupport(), QHttpNetworkConnectionPrivate::emitProxyAuthenticationRequired(), ensureConnection(), handleStatus(), handleUnexpectedEOF(), ignoreSslErrors(), ignoreSslErrors(), init(), pipelineFlush(), resetUploadData(), setProxy(), and setSslConfiguration().
bool QHttpNetworkConnectionChannel::ssl |
Definition at line 74 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_bytesWritten(), _q_connected(), _q_error(), allDone(), ensureConnection(), and QHttpNetworkConnectionPrivate::init().
QScopedPointer<QSslConfiguration> QHttpNetworkConnectionChannel::sslConfiguration |
Definition at line 95 of file qhttpnetworkconnectionchannel_p.h.
Referenced by init(), and setSslConfiguration().
ChannelState QHttpNetworkConnectionChannel::state |
Definition at line 76 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_disconnected(), _q_encrypted(), _q_error(), QHttpProtocolHandler::_q_readyRead(), abort(), allDone(), close(), ensureConnection(), isSocketBusy(), isSocketReading(), isSocketWaiting(), isSocketWriting(), QHttp2ProtocolHandler::sendRequest(), QHttpProtocolHandler::sendRequest(), and QHttpNetworkConnectionPrivate::shouldEmitChannelError().
bool QHttpNetworkConnectionChannel::switchedToHttp2 = false |
Definition at line 91 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected(), _q_encrypted(), _q_error(), _q_proxyAuthenticationRequired(), allDone(), QHttpNetworkConnectionPrivate::emitProxyAuthenticationRequired(), and resetUploadData().
qint64 QHttpNetworkConnectionChannel::written |
Definition at line 79 of file qhttpnetworkconnectionchannel_p.h.
Referenced by allDone(), resetUploadData(), and QHttpProtocolHandler::sendRequest().