Source code

Revision control

Other Tools

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 nsIPrincipal;
9
interface nsIURI;
10
interface nsIInterfaceRequestor;
11
12
[scriptable, uuid(d74a17ac-5b8a-4824-a309-b1f04a3c4aed)]
13
interface nsISpeculativeConnect : nsISupports
14
{
15
/**
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.
20
*
21
* No obligation is taken on by the implementer, nor is the submitter obligated
22
* to actually open the new channel.
23
*
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.
28
* May be null.
29
*
30
*/
31
void speculativeConnect(in nsIURI aURI,
32
in nsIPrincipal aPrincipal,
33
in nsIInterfaceRequestor aCallbacks);
34
35
void speculativeAnonymousConnect(in nsIURI aURI,
36
in nsIPrincipal aPrincipal,
37
in nsIInterfaceRequestor aCallbacks);
38
};
39
40
/**
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
43
* connection.
44
*/
45
[builtinclass, uuid(1040ebe3-6ed1-45a6-8587-995e082518d7)]
46
interface nsISpeculativeConnectionOverrider : nsISupports
47
{
48
/**
49
* Used to determine the maximum number of unused speculative connections
50
* we will have open for a host at any one time
51
*/
52
[infallible] readonly attribute unsigned long parallelSpeculativeConnectLimit;
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
61
/*
62
* Used by the Predictor to gather telemetry data on speculative connection
63
* usage.
64
*/
65
[infallible] readonly attribute boolean isFromPredictor;
66
67
/**
68
* by default speculative connections are not made to RFC 1918 addresses
69
*/
70
[infallible] readonly attribute boolean allow1918;
71
};