1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsISpeculativeConnect.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsIURI; 1.12 +interface nsIInterfaceRequestor; 1.13 + 1.14 +[scriptable, uuid(fa580a8d-f4a4-47c5-8ade-4f9786e8d1de)] 1.15 +interface nsISpeculativeConnect : nsISupports 1.16 +{ 1.17 + /** 1.18 + * Called as a hint to indicate a new transaction for the URI is likely coming 1.19 + * soon. The implementer may use this information to start a TCP 1.20 + * and/or SSL level handshake for that resource immediately so that it is 1.21 + * ready and/or progressed when the transaction is actually submitted. 1.22 + * 1.23 + * No obligation is taken on by the implementer, nor is the submitter obligated 1.24 + * to actually open the new channel. 1.25 + * 1.26 + * @param aURI the URI of the hinted transaction 1.27 + * @param aCallbacks any security callbacks for use with SSL for interfaces 1.28 + * such as nsIBadCertListener. May be null. 1.29 + * 1.30 + */ 1.31 + void speculativeConnect(in nsIURI aURI, 1.32 + in nsIInterfaceRequestor aCallbacks); 1.33 + 1.34 +}; 1.35 + 1.36 +/** 1.37 + * This is used to override the default values for various values (documented 1.38 + * inline) to determine whether or not to actually make a speculative 1.39 + * connection. 1.40 + */ 1.41 +[builtinclass, uuid(2b6d6fb6-ab28-4f4c-af84-bfdbb7866d72)] 1.42 +interface nsISpeculativeConnectionOverrider : nsISupports 1.43 +{ 1.44 + /** 1.45 + * Used to determine the maximum number of unused speculative connections 1.46 + * we will have open for a host at any one time 1.47 + */ 1.48 + [infallible] readonly attribute unsigned long parallelSpeculativeConnectLimit; 1.49 + 1.50 + /** 1.51 + * Used to loosen the restrictions nsHttpConnectionMgr::RestrictConnections 1.52 + * to allow more speculative connections when we're unsure if a host will 1.53 + * connect via SPDY or not. 1.54 + */ 1.55 + [infallible] readonly attribute boolean ignorePossibleSpdyConnections; 1.56 + 1.57 + /** 1.58 + * Used to determine if we will ignore the existence of any currently idle 1.59 + * connections when we decide whether or not to make a speculative 1.60 + * connection. 1.61 + */ 1.62 + [infallible] readonly attribute boolean ignoreIdle; 1.63 +};