Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#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 |
Public Member Functions inherited from QObject | |
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. | |
bool | moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL) |
Changes the thread affinity for this object and its children and returns true on success. | |
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::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
void | killTimer (Qt::TimerId id) |
template<typename T > | |
T | findChild (QAnyStringView aName, 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 (QAnyStringView 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 > | |
T | findChild (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. | |
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_abstract_socket (QAbstractSocket *socket) |
void | _q_connected_local_socket (QLocalSocket *socket) |
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 | |
Public Slots inherited from QObject | |
void | deleteLater () |
\threadsafe | |
Signals inherited from QObject | |
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 Public Member Functions inherited from QObject | |
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) |
Protected Member Functions inherited from QObject | |
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) | |
Protected Attributes inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Properties inherited from QObject | |
QString | objectName |
the name of this object | |
Related Symbols inherited from QObject | |
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 61 of file qhttpnetworkconnectionchannel_p.h.
Enumerator | |
---|---|
IdleState | |
ConnectingState | |
WritingState | |
WaitingState | |
ReadingState | |
ClosingState | |
BusyState |
Definition at line 66 of file qhttpnetworkconnectionchannel_p.h.
Enumerator | |
---|---|
PipeliningSupportUnknown | |
PipeliningProbablySupported | |
PipeliningNotSupported |
Definition at line 107 of file qhttpnetworkconnectionchannel_p.h.
QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel | ( | ) |
Definition at line 51 of file qhttpnetworkconnectionchannel.cpp.
Definition at line 833 of file qhttpnetworkconnectionchannel.cpp.
References isSocketWriting(), Q_UNUSED, sendRequest(), and ssl.
Referenced by init().
|
protectedslot |
Definition at line 985 of file qhttpnetworkconnectionchannel.cpp.
References _q_connected_abstract_socket(), _q_connected_local_socket(), and socket.
Referenced by init().
|
protectedslot |
Definition at line 877 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, networkLayerPreference, pendingEncrypt, pipeliningSupported, PipeliningSupportUnknown, protocolHandler, QHttpProtocolHandler, Qt::QueuedConnection, reply, request, sendRequest(), QHttpNetworkConnection::setSslContext(), QMultiMap< Key, T >::size(), ssl, QHttpNetworkConnection::sslContext(), QSslSocketPrivate::sslContext(), state, and switchedToHttp2.
Referenced by _q_connected().
|
protectedslot |
Definition at line 976 of file qhttpnetworkconnectionchannel.cpp.
References connection, IdleState, reply, sendRequest(), and state.
Referenced by _q_connected().
|
protectedslot |
Definition at line 848 of file qhttpnetworkconnectionchannel.cpp.
References _q_receiveReply(), alreadyPipelinedRequests, QIODevice::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 1216 of file qhttpnetworkconnectionchannel.cpp.
References QSslConfiguration::allowedNextProtocols(), QSslConfiguration::ALPNProtocolHTTP2, QHttpNetworkConnection::channels(), connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, emit, emitFinishedWithError(), QHttpNetworkReply::encrypted(), h2RequestsToSend, i, IdleState, QMetaObject::invokeMethod(), QMultiMap< Key, T >::isEmpty(), QSslConfiguration::NextProtocolHttp1_1, QSslConfiguration::NextProtocolNegotiationNegotiated, QSslConfiguration::NextProtocolNegotiationNone, QSslConfiguration::NextProtocolNegotiationUnsupported, pendingEncrypt, protocolHandler, Q_ASSERT, Q_FALLTHROUGH, QHttpProtocolHandler, Qt::QueuedConnection, reply, requeueHttp2Requests(), sendRequestDelayed(), QHttpNetworkConnection::setConnectionType(), QHttpNetworkReply::setHttp2WasUsed(), setSslConfiguration(), socket, QNetworkReply::SslHandshakeFailedError, state, and switchedToHttp2.
Referenced by init().
Definition at line 1369 of file qhttpnetworkconnectionchannel.cpp.
References isSocketWriting(), Q_UNUSED, and sendRequest().
Referenced by init().
|
protectedslot |
Definition at line 993 of file qhttpnetworkconnectionchannel.cpp.
References _q_receiveReply(), QIODevice::bytesAvailable(), 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(), socket, QSocketAbstraction::socketState(), QAbstractSocket::SocketTimeoutError, ssl, QNetworkReply::SslHandshakeFailedError, QAbstractSocket::SslHandshakeFailedError, state, switchedToHttp2, QNetworkReply::TimeoutError, QAbstractSocket::UnconnectedState, QNetworkReply::UnknownNetworkError, and WritingState.
Referenced by QHttpProtocolHandler::_q_readyRead(), and init().
|
protectedslot |
Definition at line 1346 of file qhttpnetworkconnectionchannel.cpp.
References authenticator, connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, emit, h2RequestsToSend, pendingEncrypt, QHttpNetworkReply::preSharedKeyAuthenticationRequired(), Q_ASSERT, reply, and socket.
Referenced by init().
|
protectedslot |
Definition at line 1179 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 261 of file qhttpnetworkconnectionchannel.cpp.
References protocolHandler, and Q_ASSERT.
Referenced by init().
|
protectedslot |
Definition at line 255 of file qhttpnetworkconnectionchannel.cpp.
References protocolHandler, and Q_ASSERT.
Referenced by _q_disconnected(), and _q_error().
Definition at line 1318 of file qhttpnetworkconnectionchannel.cpp.
References connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP, emit, h2RequestsToSend, pendingEncrypt, Q_ASSERT, reply, socket, and QHttpNetworkReply::sslErrors().
Referenced by init().
|
protectedslot |
Definition at line 1196 of file qhttpnetworkconnectionchannel.cpp.
References reply, and sendRequest().
void QHttpNetworkConnectionChannel::abort | ( | ) |
Definition at line 211 of file qhttpnetworkconnectionchannel.cpp.
References ClosingState, IdleState, pendingEncrypt, socket, QSocketAbstraction::socketState(), state, QAbstractSocket::UnconnectedState, and QSocketAbstraction::visit().
Referenced by QHttpNetworkConnectionPrivate::removeReply().
void QHttpNetworkConnectionChannel::allDone | ( | ) |
Definition at line 457 of file qhttpnetworkconnectionchannel.cpp.
References alreadyPipelinedRequests, QIODevice::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, QSocketAbstraction::socketState(), ssl, state, switchedToHttp2, QList< T >::takeFirst(), QAbstractSocket::UnconnectedState, and written.
Referenced by QHttpProtocolHandler::_q_receiveReply(), and QHttpProtocolHandler::sendRequest().
void QHttpNetworkConnectionChannel::close | ( | ) |
Definition at line 188 of file qhttpnetworkconnectionchannel.cpp.
References QIODevice::close(), ClosingState, IdleState, pendingEncrypt, socket, QSocketAbstraction::socketState(), state, and QAbstractSocket::UnconnectedState.
Referenced by _q_connected_abstract_socket(), 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 794 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 581 of file qhttpnetworkconnectionchannel.cpp.
References QAbstractSocket::ConnectedState, QByteArray::contains(), QHttpNetworkReply::headerField(), QHttpNetworkReply::majorVersion(), QHttpNetworkReply::minorVersion(), PipeliningProbablySupported, pipeliningSupported, PipeliningSupportUnknown, Q_ASSERT, reply, socket, and QSocketAbstraction::socketState().
Referenced by allDone().
void QHttpNetworkConnectionChannel::emitFinishedWithError | ( | QNetworkReply::NetworkError | error, |
const char * | message ) |
Definition at line 1202 of file qhttpnetworkconnectionchannel.cpp.
References emit, error, QHttpNetworkReply::finishedWithError(), h2RequestsToSend, Q_ASSERT, and reply.
Referenced by _q_encrypted(), and QHttp2ProtocolHandler::sendRequest().
bool QHttpNetworkConnectionChannel::ensureConnection | ( | ) |
Definition at line 291 of file qhttpnetworkconnectionchannel.cpp.
References authenticationCredentialsSent, authenticator, QHttpNetworkConnection::cacheProxy(), QSslSocketPrivate::checkSettingSslContext(), QAbstractSocket::ClosingState, QAbstractSocket::ConnectedState, ConnectingState, QAbstractSocket::ConnectingState, connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QHttpNetworkConnection::ConnectionTypeHTTP2Direct, QAuthenticator::detach(), QAuthenticatorPrivate::Done, QAuthenticatorPrivate::getPrivate(), h2RequestsToSend, QHttpNetworkRequest::headerField(), QNetworkProxy::headers(), QAbstractSocket::HostLookupState, QHttpNetworkConnection::hostName(), QNetworkProxy::HttpProxy, ignoreAllSslErrors, ignoreSslErrorsList, init(), QMetaObject::invokeMethod(), QUrl::isEmpty(), QMultiMap< Key, T >::isEmpty(), isInitialized, QIODevice::isOpen(), networkLayerPreference, QNetworkProxy::NoProxy, QHttpNetworkConnection::peerVerifyName(), pendingEncrypt, pipeliningSupported, PipeliningSupportUnknown, QHttpNetworkConnection::port(), priv(), QNetworkReply::ProtocolUnknownError, proxy, proxyAuthenticator, proxyCredentialsSent, Q_ASSERT, Qt::QueuedConnection, QIODeviceBase::ReadWrite, QHttpHeaders::replaceOrAppend(), reply, request, resendCurrent, QNetworkProxy::setHeaders(), socket, QSocketAbstraction::socketState(), ssl, QHttpNetworkConnection::sslContext(), QAuthenticatorPrivate::Start, state, QHttpNetworkConnection::transparentProxy(), QNetworkProxy::type(), QIODeviceBase::Unbuffered, QAbstractSocket::UnconnectedState, QHttpNetworkRequest::url(), and QHttpHeaders::UserAgent.
Referenced by QHttpNetworkConnectionPrivate::_q_connectDelayedChannel(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), QHttpProtocolHandler::sendRequest(), QHttpNetworkConnectionPrivate::shouldEmitChannelError(), and QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup().
void QHttpNetworkConnectionChannel::handleStatus | ( | ) |
Definition at line 622 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 268 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 725 of file qhttpnetworkconnectionchannel.cpp.
References ignoreAllSslErrors, ignoreSslErrors(), and socket.
Referenced by ignoreSslErrors(), and ignoreSslErrors().
Definition at line 734 of file qhttpnetworkconnectionchannel.cpp.
References ignoreSslErrors(), ignoreSslErrorsList, and socket.
void QHttpNetworkConnectionChannel::init | ( | ) |
Definition at line 77 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(), QIODevice::bytesWritten(), QObject::connect(), connection, QHttpNetworkConnection::connectionType(), QHttpNetworkConnection::ConnectionTypeHTTP2, QScopedPointer< T, Cleanup >::data(), Qt::DirectConnection, QSslSocket::encrypted(), QSslSocket::encryptedBytesWritten(), error, QAbstractSocket::errorOccurred(), ignoreAllSslErrors, ignoreSslErrorsList, QList< T >::isEmpty(), isInitialized, QSslConfiguration::isNull(), QNetworkProxy::NoProxy, QSslSocket::preSharedKeyAuthenticationRequired(), protocolHandler, proxy, QAbstractSocket::proxyAuthenticationRequired(), QHttpProtocolHandler, QIODevice::readyRead(), QAbstractSocket::setProxy(), socket, sslConfiguration, QSslSocket::sslErrors(), QNetworkProxy::type(), and QSocketAbstraction::visit().
Referenced by ensureConnection().
bool QHttpNetworkConnectionChannel::isSocketBusy | ( | ) | const |
Definition at line 813 of file qhttpnetworkconnectionchannel.cpp.
bool QHttpNetworkConnectionChannel::isSocketReading | ( | ) | const |
Definition at line 828 of file qhttpnetworkconnectionchannel.cpp.
References ReadingState, and state.
Referenced by _q_disconnected(), and QHttpProtocolHandler::_q_readyRead().
bool QHttpNetworkConnectionChannel::isSocketWaiting | ( | ) | const |
Definition at line 823 of file qhttpnetworkconnectionchannel.cpp.
References state, and WaitingState.
Referenced by _q_disconnected(), and QHttpProtocolHandler::_q_readyRead().
bool QHttpNetworkConnectionChannel::isSocketWriting | ( | ) | const |
Definition at line 818 of file qhttpnetworkconnectionchannel.cpp.
References state, and WritingState.
Referenced by _q_bytesWritten(), and _q_encryptedBytesWritten().
void QHttpNetworkConnectionChannel::pipelineFlush | ( | ) |
Definition at line 779 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 755 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 609 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 1311 of file qhttpnetworkconnectionchannel.cpp.
References connection, and h2RequestsToSend.
Referenced by _q_encrypted().
void QHttpNetworkConnectionChannel::resendCurrentRequest | ( | ) |
Definition at line 804 of file qhttpnetworkconnectionchannel.cpp.
References connection, QMetaObject::invokeMethod(), Qt::QueuedConnection, reply, requeueCurrentlyPipelinedRequests(), and resendCurrent.
Referenced by _q_error().
bool QHttpNetworkConnectionChannel::resetUploadData | ( | ) |
Definition at line 690 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 234 of file qhttpnetworkconnectionchannel.cpp.
References protocolHandler, and Q_ASSERT.
Referenced by _q_bytesWritten(), _q_connected_abstract_socket(), _q_connected_local_socket(), _q_encryptedBytesWritten(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), and _q_uploadDataReadyRead().
void QHttpNetworkConnectionChannel::sendRequestDelayed | ( | ) |
Definition at line 246 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 1380 of file qhttpnetworkconnectionchannel.cpp.
References connection.
Referenced by QHttpNetworkConnectionPrivate::init().
void QHttpNetworkConnectionChannel::setProxy | ( | const QNetworkProxy & | networkProxy | ) |
Definition at line 713 of file qhttpnetworkconnectionchannel.cpp.
void QHttpNetworkConnectionChannel::setSslConfiguration | ( | const QSslConfiguration & | config | ) |
Definition at line 742 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 177 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_encrypted(), and init().
QList<HttpMessagePair> QHttpNetworkConnectionChannel::alreadyPipelinedRequests |
Definition at line 113 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_disconnected(), allDone(), QHttpNetworkConnectionPrivate::fillPipeline(), handleStatus(), pipelineInto(), QHttpNetworkConnectionPrivate::removeReply(), and requeueCurrentlyPipelinedRequests().
bool QHttpNetworkConnectionChannel::authenticationCredentialsSent |
Definition at line 89 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), and QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().
QAuthenticator QHttpNetworkConnectionChannel::authenticator |
Definition at line 87 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 82 of file qhttpnetworkconnectionchannel_p.h.
Referenced by allDone(), and QHttpProtocolHandler::sendRequest().
QPointer<QHttpNetworkConnection> QHttpNetworkConnectionChannel::connection |
Definition at line 125 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_connected_local_socket(), _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 92 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), emitFinishedWithError(), ensureConnection(), QHttpNetworkConnectionPrivate::fillHttp2Queue(), QHttpNetworkConnectionPrivate::queueRequest(), QHttpNetworkConnectionPrivate::removeReply(), requeueHttp2Requests(), and QHttp2ProtocolHandler::sendRequest().
bool QHttpNetworkConnectionChannel::ignoreAllSslErrors |
Definition at line 95 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), ignoreSslErrors(), and init().
Definition at line 96 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), ignoreSslErrors(), and init().
bool QHttpNetworkConnectionChannel::isInitialized |
Definition at line 77 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), and init().
int QHttpNetworkConnectionChannel::lastStatus |
Definition at line 84 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpProtocolHandler::_q_receiveReply().
QAbstractSocket::NetworkLayerProtocol QHttpNetworkConnectionChannel::networkLayerPreference |
Definition at line 122 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), ensureConnection(), QHttpNetworkConnectionPrivate::shouldEmitChannelError(), and QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup().
bool QHttpNetworkConnectionChannel::pendingEncrypt |
Definition at line 85 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_sslErrors(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), abort(), close(), and ensureConnection().
QByteArray QHttpNetworkConnectionChannel::pipeline |
Definition at line 114 of file qhttpnetworkconnectionchannel_p.h.
Referenced by pipelineFlush(), and pipelineInto().
PipeliningSupport QHttpNetworkConnectionChannel::pipeliningSupported |
Definition at line 112 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), detectPipeliningSupport(), and ensureConnection().
std::unique_ptr<QAbstractProtocolHandler> QHttpNetworkConnectionChannel::protocolHandler |
Definition at line 91 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_encrypted(), _q_error(), _q_readyRead(), _q_receiveReply(), allDone(), QHttpNetworkConnectionPrivate::emitReplyError(), handleUnexpectedEOF(), init(), QHttpNetworkConnectionPrivate::removeReply(), sendRequest(), and sendRequestDelayed().
QNetworkProxy QHttpNetworkConnectionChannel::proxy |
Definition at line 128 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpNetworkConnectionPrivate::_q_hostLookupFinished(), _q_proxyAuthenticationRequired(), ensureConnection(), init(), setProxy(), and QHttpNetworkConnectionPrivate::startHostInfoLookup().
QAuthenticator QHttpNetworkConnectionChannel::proxyAuthenticator |
Definition at line 88 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpNetworkConnectionPrivate::copyCredentials(), ensureConnection(), QHttpNetworkConnectionPrivate::fillPipeline(), and QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().
bool QHttpNetworkConnectionChannel::proxyCredentialsSent |
Definition at line 90 of file qhttpnetworkconnectionchannel_p.h.
Referenced by ensureConnection(), and QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().
int QHttpNetworkConnectionChannel::reconnectAttempts |
Definition at line 86 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_error(), allDone(), and handleUnexpectedEOF().
QHttpNetworkReply* QHttpNetworkConnectionChannel::reply |
Definition at line 80 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_connected_local_socket(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), _q_uploadDataReadyRead(), allDone(), closeAndResendCurrentRequest(), detectPipeliningSupport(), emitFinishedWithError(), QHttpNetworkConnectionPrivate::emitReplyError(), ensureConnection(), handleStatus(), handleUnexpectedEOF(), pipelineInto(), QHttpNetworkConnectionPrivate::removeReply(), resendCurrentRequest(), resetUploadData(), QHttpProtocolHandler::sendRequest(), sendRequestDelayed(), and QHttpNetworkConnectionPrivate::updateChannel().
QHttpNetworkRequest QHttpNetworkConnectionChannel::request |
Definition at line 79 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), allDone(), QHttpNetworkConnectionPrivate::emitReplyError(), ensureConnection(), handleUnexpectedEOF(), pipelineInto(), QHttpNetworkConnectionPrivate::removeReply(), resetUploadData(), QHttpProtocolHandler::sendRequest(), and QHttpNetworkConnectionPrivate::updateChannel().
bool QHttpNetworkConnectionChannel::resendCurrent |
Definition at line 83 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_disconnected(), QHttpNetworkConnectionPrivate::_q_startNextRequest(), allDone(), closeAndResendCurrentRequest(), ensureConnection(), handleStatus(), QHttpNetworkConnectionPrivate::removeReply(), and resendCurrentRequest().
QIODevice* QHttpNetworkConnectionChannel::socket |
Definition at line 75 of file qhttpnetworkconnectionchannel_p.h.
Referenced by QHttpNetworkConnectionPrivate::~QHttpNetworkConnectionPrivate(), _q_connected(), _q_disconnected(), _q_encrypted(), _q_error(), _q_preSharedKeyAuthenticationRequired(), _q_proxyAuthenticationRequired(), _q_sslErrors(), abort(), allDone(), close(), detectPipeliningSupport(), ensureConnection(), handleStatus(), handleUnexpectedEOF(), ignoreSslErrors(), ignoreSslErrors(), init(), pipelineFlush(), resetUploadData(), setProxy(), and setSslConfiguration().
bool QHttpNetworkConnectionChannel::ssl |
Definition at line 76 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_bytesWritten(), _q_connected_abstract_socket(), _q_error(), allDone(), ensureConnection(), and QHttpNetworkConnectionPrivate::init().
QScopedPointer<QSslConfiguration> QHttpNetworkConnectionChannel::sslConfiguration |
Definition at line 97 of file qhttpnetworkconnectionchannel_p.h.
Referenced by init(), and setSslConfiguration().
ChannelState QHttpNetworkConnectionChannel::state |
Definition at line 78 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_connected_local_socket(), _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 93 of file qhttpnetworkconnectionchannel_p.h.
Referenced by _q_connected_abstract_socket(), _q_encrypted(), _q_error(), _q_proxyAuthenticationRequired(), allDone(), and resetUploadData().
qint64 QHttpNetworkConnectionChannel::written |
Definition at line 81 of file qhttpnetworkconnectionchannel_p.h.
Referenced by allDone(), resetUploadData(), and QHttpProtocolHandler::sendRequest().