/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */
//----------------------------------------------------------------------------- // nsHttpConnection - represents a connection to a HTTP server (or proxy) // // NOTE: this objects lives on the socket thread only. it should not be // accessed from any other thread. //-----------------------------------------------------------------------------
class HttpConnectionBase : public nsSupportsWeakReference { public:
NS_DECLARE_STATIC_IID_ACCESSOR(HTTPCONNECTIONBASE_IID)
HttpConnectionBase();
// Activate causes the given transaction to be processed on this // connection. It fails if there is already an existing transaction unless // a multiplexing protocol such as SPDY is being used
[[nodiscard]] virtual nsresult Activate(nsAHttpTransaction*, uint32_t caps,
int32_t pri) = 0;
// Close the underlying socket transport. virtualvoid Close(nsresult reason, bool aIsShutdown = false) = 0;
virtualbool CanReuse() = 0; // can this connection be reused? virtualbool CanDirectlyActivate() = 0;
// IsExperienced() returns true when the connection has started at least one // non null HTTP transaction of any version. bool IsExperienced() { return mExperienced; }
// Return true when the socket this connection is using has not been // authenticated using a client certificate. Before SSL negotiation // has finished this returns false. virtualbool NoClientCertAuth() const { returntrue; }
// Represent if the connection has served more than one request.
ConnectionExperienceState mExperienceState =
ConnectionExperienceState::Not_Experienced;
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.