Line data Source code
1 : /* This Source Code Form is subject to the terms of the Mozilla Public
2 : * License, v. 2.0. If a copy of the MPL was not distributed with this
3 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 :
5 : #ifndef mozilla_net_DashboardTypes_h_
6 : #define mozilla_net_DashboardTypes_h_
7 :
8 : #include "nsString.h"
9 : #include "nsTArray.h"
10 :
11 : namespace mozilla {
12 : namespace net {
13 :
14 0 : struct SocketInfo
15 : {
16 : nsCString host;
17 : uint64_t sent;
18 : uint64_t received;
19 : uint16_t port;
20 : bool active;
21 : bool tcp;
22 : };
23 :
24 : struct HalfOpenSockets
25 : {
26 : bool speculative;
27 : };
28 :
29 0 : struct DNSCacheEntries
30 : {
31 : nsCString hostname;
32 : nsTArray<nsCString> hostaddr;
33 : uint16_t family;
34 : int64_t expiration;
35 : nsCString netInterface;
36 : };
37 :
38 0 : struct HttpConnInfo
39 : {
40 : uint32_t ttl;
41 : uint32_t rtt;
42 : nsString protocolVersion;
43 :
44 : void SetHTTP1ProtocolVersion(uint8_t pv);
45 : void SetHTTP2ProtocolVersion(uint8_t pv);
46 : };
47 :
48 0 : struct HttpRetParams
49 : {
50 : nsCString host;
51 : nsTArray<HttpConnInfo> active;
52 : nsTArray<HttpConnInfo> idle;
53 : nsTArray<HalfOpenSockets> halfOpens;
54 : uint32_t counter;
55 : uint16_t port;
56 : bool spdy;
57 : bool ssl;
58 : };
59 :
60 : } // namespace net
61 : } // namespace mozilla
62 :
63 : #endif // mozilla_net_DashboardTypes_h_
|