netwerk/base/src/DashboardTypes.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     5 #ifndef mozilla_net_DashboardTypes_h_
     6 #define mozilla_net_DashboardTypes_h_
     8 #include "nsString.h"
     9 #include "nsTArray.h"
    11 namespace mozilla {
    12 namespace net {
    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 };
    24 struct HalfOpenSockets
    25 {
    26     bool speculative;
    27 };
    29 struct DNSCacheEntries
    30 {
    31     nsCString hostname;
    32     nsTArray<nsCString> hostaddr;
    33     uint16_t family;
    34     int64_t expiration;
    35 };
    37 struct HttpConnInfo
    38 {
    39     uint32_t ttl;
    40     uint32_t rtt;
    41     nsString protocolVersion;
    43     void SetHTTP1ProtocolVersion(uint8_t pv);
    44     void SetHTTP2ProtocolVersion(uint8_t pv);
    45 };
    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 };
    59 } }
    61 #endif // mozilla_net_DashboardTypes_h_

mercurial