netwerk/base/public/nsISpeculativeConnect.idl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:0cb1c519e056
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/. */
5
6 #include "nsISupports.idl"
7
8 interface nsIURI;
9 interface nsIInterfaceRequestor;
10
11 [scriptable, uuid(fa580a8d-f4a4-47c5-8ade-4f9786e8d1de)]
12 interface nsISpeculativeConnect : nsISupports
13 {
14 /**
15 * Called as a hint to indicate a new transaction for the URI is likely coming
16 * soon. The implementer may use this information to start a TCP
17 * and/or SSL level handshake for that resource immediately so that it is
18 * ready and/or progressed when the transaction is actually submitted.
19 *
20 * No obligation is taken on by the implementer, nor is the submitter obligated
21 * to actually open the new channel.
22 *
23 * @param aURI the URI of the hinted transaction
24 * @param aCallbacks any security callbacks for use with SSL for interfaces
25 * such as nsIBadCertListener. May be null.
26 *
27 */
28 void speculativeConnect(in nsIURI aURI,
29 in nsIInterfaceRequestor aCallbacks);
30
31 };
32
33 /**
34 * This is used to override the default values for various values (documented
35 * inline) to determine whether or not to actually make a speculative
36 * connection.
37 */
38 [builtinclass, uuid(2b6d6fb6-ab28-4f4c-af84-bfdbb7866d72)]
39 interface nsISpeculativeConnectionOverrider : nsISupports
40 {
41 /**
42 * Used to determine the maximum number of unused speculative connections
43 * we will have open for a host at any one time
44 */
45 [infallible] readonly attribute unsigned long parallelSpeculativeConnectLimit;
46
47 /**
48 * Used to loosen the restrictions nsHttpConnectionMgr::RestrictConnections
49 * to allow more speculative connections when we're unsure if a host will
50 * connect via SPDY or not.
51 */
52 [infallible] readonly attribute boolean ignorePossibleSpdyConnections;
53
54 /**
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
57 * connection.
58 */
59 [infallible] readonly attribute boolean ignoreIdle;
60 };

mercurial