Quellcode-Bibliothek HttpConnectionMgrShell.h
Sprache: C
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class nsIEventTarget; class nsIHttpUpgradeListener; class nsIInterfaceRequestor;
namespace mozilla::net {
class ARefBase; class EventTokenBucket; class HttpTransactionShell; class nsHttpConnectionInfo; class HttpConnectionBase; class nsHttpConnectionMgr; class HttpConnectionMgrParent; class SpeculativeTransaction; class ClassOfService;
//---------------------------------------------------------------------------- // Abstract base class for HTTP connection manager in chrome process //----------------------------------------------------------------------------
// called from main thread to post a new request token bucket // to the socket thread
[[nodiscard]] virtual nsresult UpdateRequestTokenBucket(
EventTokenBucket* aBucket) = 0;
// Close all idle persistent connections and prevent any active connections // from being reused.
[[nodiscard]] virtual nsresult DoShiftReloadConnectionCleanup() = 0;
// Like DoShiftReloadConnectionCleanup() above, but also resets CI specific // information such as Happy Eyeballs history.
[[nodiscard]] virtual nsresult DoShiftReloadConnectionCleanupWithConnInfo(
nsHttpConnectionInfo*) = 0;
// called to force the connection manager to prune its list of idle // connections.
[[nodiscard]] virtual nsresult PruneDeadConnections() = 0;
// this cancels all outstanding transactions but does not shut down the mgr virtualvoid AbortAndCloseAllConnections(int32_t, ARefBase*) = 0;
// called to update a parameter after the connection manager has already // been initialized.
[[nodiscard]] virtual nsresult UpdateParam(nsParamName name,
uint16_t value) = 0;
// Causes a large amount of connection diagnostic information to be // printed to the javascript console virtualvoid PrintDiagnostics() = 0;
// adds a transaction to the list of managed transactions.
[[nodiscard]] virtual nsresult AddTransaction(HttpTransactionShell*,
int32_t priority) = 0;
// Add a new transaction with a sticky connection from |transWithStickyConn|.
[[nodiscard]] virtual nsresult AddTransactionWithStickyConn(
HttpTransactionShell* trans, int32_t priority,
HttpTransactionShell* transWithStickyConn) = 0;
// called to reschedule the given transaction. it must already have been // added to the connection manager via AddTransaction.
[[nodiscard]] virtual nsresult RescheduleTransaction(HttpTransactionShell*,
int32_t priority) = 0;
// cancels a transaction w/ the given reason.
[[nodiscard]] virtual nsresult CancelTransaction(HttpTransactionShell*,
nsresult reason) = 0;
// called when a connection is done processing a transaction. if the // connection can be reused then it will be added to the idle list, else // it will be closed.
[[nodiscard]] virtual nsresult ReclaimConnection(
HttpConnectionBase* conn) = 0;
// called to force the transaction queue to be processed once more, giving // preference to the specified connection.
[[nodiscard]] virtual nsresult ProcessPendingQ(nsHttpConnectionInfo*) = 0;
// Try and process all pending transactions
[[nodiscard]] virtual nsresult ProcessPendingQ() = 0;
// called to get a reference to the socket transport service. the socket // transport service is not available when the connection manager is down.
[[nodiscard]] virtual nsresult GetSocketThreadTarget(nsIEventTarget**) = 0;
// called to indicate a transaction for the connectionInfo is likely coming // soon. The connection manager may use this information to start a TCP // and/or SSL level handshake for that resource immediately so that it is // ready when the transaction is submitted. No obligation is taken on by the // connection manager, nor is the submitter obligated to actually submit a // real transaction for this connectionInfo.
[[nodiscard]] virtual nsresult SpeculativeConnect(
nsHttpConnectionInfo*, nsIInterfaceRequestor*, uint32_t caps = 0,
SpeculativeTransaction* = nullptr, bool aFetchHTTPSRR = false) = 0;
// "VerifyTraffic" means marking connections now, and then check again in // N seconds to see if there's been any traffic and if not, kill // that connection.
[[nodiscard]] virtual nsresult VerifyTraffic() = 0;
// clears the connection history mCT
[[nodiscard]] virtual nsresult ClearConnectionHistory() = 0;
// called by the main thread to execute the taketransport() logic on the // socket thread after a 101 response has been received and the socket // needs to be transferred to an expectant upgrade listener such as // websockets. // @param aTrans: a transaction that contains a sticky connection. We'll // take the transport of this connection.
[[nodiscard]] virtual nsresult CompleteUpgrade(
HttpTransactionShell* aTrans,
nsIHttpUpgradeListener* aUpgradeListener) = 0;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.