1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
8 interface nsIPrincipal
;
10 interface nsIInterfaceRequestor
;
12 [scriptable
, uuid(d74a17ac
-5b8a
-4824-a309
-b1f04a3c4aed
)]
13 interface nsISpeculativeConnect
: nsISupports
16 * Called as a hint to indicate a new transaction for the URI is likely coming
17 * soon. The implementer may use this information to start a TCP
18 * and/or SSL level handshake for that resource immediately so that it is
19 * ready and/or progressed when the transaction is actually submitted.
21 * No obligation is taken on by the implementer, nor is the submitter obligated
22 * to actually open the new channel.
24 * @param aURI the URI of the hinted transaction
25 * @param aPrincipal the principal that will be used for opening the
26 * channel of the hinted transaction.
27 * @param aCallbacks any security callbacks for use with SSL for interfaces.
31 void speculativeConnect
(in nsIURI aURI
,
32 in nsIPrincipal aPrincipal
,
33 in nsIInterfaceRequestor aCallbacks
);
35 void speculativeAnonymousConnect
(in nsIURI aURI
,
36 in nsIPrincipal aPrincipal
,
37 in nsIInterfaceRequestor aCallbacks
);
41 * This is used to override the default values for various values (documented
42 * inline) to determine whether or not to actually make a speculative
45 [builtinclass
, uuid(1040ebe3
-6ed1
-45a6
-8587-995e082518d7
)]
46 interface nsISpeculativeConnectionOverrider
: nsISupports
49 * Used to determine the maximum number of unused speculative connections
50 * we will have open for a host at any one time
52 [infallible
] readonly attribute
unsigned long parallelSpeculativeConnectLimit
;
55 * Used to determine if we will ignore the existence of any currently idle
56 * connections when we decide whether or not to make a speculative
59 [infallible
] readonly attribute
boolean ignoreIdle
;
62 * Used by the Predictor to gather telemetry data on speculative connection
65 [infallible
] readonly attribute
boolean isFromPredictor
;
68 * by default speculative connections are not made to RFC 1918 addresses
70 [infallible
] readonly attribute
boolean allow1918
;