OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_ |
6 #define NET_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_ | 6 #define NET_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace test { | 26 namespace test { |
27 | 27 |
28 class SimpleFramerVisitor; | 28 class SimpleFramerVisitor; |
29 | 29 |
30 // Peer to make public a number of otherwise private QuicFramer methods. | 30 // Peer to make public a number of otherwise private QuicFramer methods. |
31 class SimpleQuicFramer { | 31 class SimpleQuicFramer { |
32 public: | 32 public: |
33 SimpleQuicFramer(); | 33 SimpleQuicFramer(); |
34 explicit SimpleQuicFramer(const QuicVersionVector& supported_versions); | 34 explicit SimpleQuicFramer(const QuicVersionVector& supported_versions); |
| 35 SimpleQuicFramer(const QuicVersionVector& supported_versions, |
| 36 Perspective perspective); |
35 ~SimpleQuicFramer(); | 37 ~SimpleQuicFramer(); |
36 | 38 |
37 bool ProcessPacket(const QuicEncryptedPacket& packet); | 39 bool ProcessPacket(const QuicEncryptedPacket& packet); |
38 void Reset(); | 40 void Reset(); |
39 | 41 |
40 const QuicPacketHeader& header() const; | 42 const QuicPacketHeader& header() const; |
41 size_t num_frames() const; | 43 size_t num_frames() const; |
42 const std::vector<QuicAckFrame>& ack_frames() const; | 44 const std::vector<QuicAckFrame>& ack_frames() const; |
43 const std::vector<QuicConnectionCloseFrame>& connection_close_frames() const; | 45 const std::vector<QuicConnectionCloseFrame>& connection_close_frames() const; |
44 const std::vector<QuicStopWaitingFrame>& stop_waiting_frames() const; | 46 const std::vector<QuicStopWaitingFrame>& stop_waiting_frames() const; |
(...skipping 13 matching lines...) Expand all Loading... |
58 QuicFramer framer_; | 60 QuicFramer framer_; |
59 std::unique_ptr<SimpleFramerVisitor> visitor_; | 61 std::unique_ptr<SimpleFramerVisitor> visitor_; |
60 DISALLOW_COPY_AND_ASSIGN(SimpleQuicFramer); | 62 DISALLOW_COPY_AND_ASSIGN(SimpleQuicFramer); |
61 }; | 63 }; |
62 | 64 |
63 } // namespace test | 65 } // namespace test |
64 | 66 |
65 } // namespace net | 67 } // namespace net |
66 | 68 |
67 #endif // NET_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_ | 69 #endif // NET_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_ |
OLD | NEW |