netwerk/base/src/DashboardTypes.h

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:b7b9153c1a0a
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 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 struct DNSCacheEntries
30 {
31 nsCString hostname;
32 nsTArray<nsCString> hostaddr;
33 uint16_t family;
34 int64_t expiration;
35 };
36
37 struct HttpConnInfo
38 {
39 uint32_t ttl;
40 uint32_t rtt;
41 nsString protocolVersion;
42
43 void SetHTTP1ProtocolVersion(uint8_t pv);
44 void SetHTTP2ProtocolVersion(uint8_t pv);
45 };
46
47 struct HttpRetParams
48 {
49 nsCString host;
50 nsTArray<HttpConnInfo> active;
51 nsTArray<HttpConnInfo> idle;
52 nsTArray<HalfOpenSockets> halfOpens;
53 uint32_t counter;
54 uint16_t port;
55 bool spdy;
56 bool ssl;
57 };
58
59 } }
60
61 #endif // mozilla_net_DashboardTypes_h_

mercurial