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/quic/uint128.h" | |
13 #include "net/quic/quic_protocol.h" | |
jar (doing other things)
2012/10/14 23:04:38
nit: alphabetize
Ryan Hamilton
2012/10/15 21:22:08
Done.
| |
14 | |
15 class SocketAddress; | |
16 | |
17 namespace gfe2 { | |
18 class BalsaHeaders; | |
19 } | |
20 | |
21 namespace net { | |
22 | |
23 class QuicUtils { | |
24 public: | |
25 // The overhead the quic framing will add for a packet with num_fragments | |
26 // fragments. | |
27 static int StreamFragmentPacketOverhead(int num_fragments); | |
28 | |
29 // returns the 128 bit FNV1a hash of the data. See | |
30 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param | |
31 static uint128 FNV1a_128_Hash(const char* data, int len); | |
32 | |
33 // Returns the name of the quic error code as a char* | |
34 static const char* ErrorToString(QuicErrorCode error); | |
35 }; | |
36 | |
37 } // namespace net | |
38 | |
39 #endif // NET_QUIC_QUIC_UTILS_H_ | |
OLD | NEW |