OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Some helpers for quic | |
6 | |
7 #ifndef NET_QUIC_QUIC_UTILS_H_ | |
8 #define NET_QUIC_QUIC_UTILS_H_ | |
9 | |
10 #include <string> | |
11 | |
12 #include "net/base/net_export.h" | |
13 #include "net/quic/quic_protocol.h" | |
14 #include "net/quic/uint128.h" | |
15 | |
16 class SocketAddress; | |
17 | |
18 namespace gfe2 { | |
19 class BalsaHeaders; | |
20 } | |
Ryan Sleevi
2012/10/17 04:27:13
BUG? o_O
| |
21 | |
22 namespace net { | |
23 | |
24 class NET_EXPORT_PRIVATE QuicUtils { | |
25 public: | |
26 // The overhead the quic framing will add for a packet with num_fragments | |
27 // fragments. | |
28 static int StreamFragmentPacketOverhead(int num_fragments); | |
29 | |
30 // returns the 128 bit FNV1a hash of the data. See | |
31 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param | |
32 static uint128 FNV1a_128_Hash(const char* data, int len); | |
33 | |
34 // Returns the name of the quic error code as a char* | |
35 static const char* ErrorToString(QuicErrorCode error); | |
36 }; | |
37 | |
38 } // namespace net | |
39 | |
40 #endif // NET_QUIC_QUIC_UTILS_H_ | |
OLD | NEW |