| 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_SPDY_BUFFERED_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual void OnStreamError(SpdyStreamId stream_id, | 32 virtual void OnStreamError(SpdyStreamId stream_id, |
| 33 const std::string& description) = 0; | 33 const std::string& description) = 0; |
| 34 | 34 |
| 35 // Called after all the header data for HEADERS control frame is received. | 35 // Called after all the header data for HEADERS control frame is received. |
| 36 virtual void OnHeaders(SpdyStreamId stream_id, | 36 virtual void OnHeaders(SpdyStreamId stream_id, |
| 37 bool has_priority, | 37 bool has_priority, |
| 38 int weight, | 38 int weight, |
| 39 SpdyStreamId parent_stream_id, | 39 SpdyStreamId parent_stream_id, |
| 40 bool exclusive, | 40 bool exclusive, |
| 41 bool fin, | 41 bool fin, |
| 42 const SpdyHeaderBlock& headers) = 0; | 42 SpdyHeaderBlock headers) = 0; |
| 43 | 43 |
| 44 // Called when a data frame header is received. | 44 // Called when a data frame header is received. |
| 45 virtual void OnDataFrameHeader(SpdyStreamId stream_id, | 45 virtual void OnDataFrameHeader(SpdyStreamId stream_id, |
| 46 size_t length, | 46 size_t length, |
| 47 bool fin) = 0; | 47 bool fin) = 0; |
| 48 | 48 |
| 49 // Called when data is received. | 49 // Called when data is received. |
| 50 // |stream_id| The stream receiving data. | 50 // |stream_id| The stream receiving data. |
| 51 // |data| A buffer containing the data received. | 51 // |data| A buffer containing the data received. |
| 52 // |len| The length of the data buffer (at most 2^24 - 1 for SPDY/3, | 52 // |len| The length of the data buffer (at most 2^24 - 1 for SPDY/3, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 SpdyGoAwayStatus status, | 90 SpdyGoAwayStatus status, |
| 91 base::StringPiece debug_data) = 0; | 91 base::StringPiece debug_data) = 0; |
| 92 | 92 |
| 93 // Called when a WINDOW_UPDATE frame has been parsed. | 93 // Called when a WINDOW_UPDATE frame has been parsed. |
| 94 virtual void OnWindowUpdate(SpdyStreamId stream_id, | 94 virtual void OnWindowUpdate(SpdyStreamId stream_id, |
| 95 int delta_window_size) = 0; | 95 int delta_window_size) = 0; |
| 96 | 96 |
| 97 // Called when a PUSH_PROMISE frame has been parsed. | 97 // Called when a PUSH_PROMISE frame has been parsed. |
| 98 virtual void OnPushPromise(SpdyStreamId stream_id, | 98 virtual void OnPushPromise(SpdyStreamId stream_id, |
| 99 SpdyStreamId promised_stream_id, | 99 SpdyStreamId promised_stream_id, |
| 100 const SpdyHeaderBlock& headers) = 0; | 100 SpdyHeaderBlock headers) = 0; |
| 101 | 101 |
| 102 // Called when an ALTSVC frame has been parsed. | 102 // Called when an ALTSVC frame has been parsed. |
| 103 virtual void OnAltSvc( | 103 virtual void OnAltSvc( |
| 104 SpdyStreamId stream_id, | 104 SpdyStreamId stream_id, |
| 105 base::StringPiece origin, | 105 base::StringPiece origin, |
| 106 const SpdyAltSvcWireFormat::AlternativeServiceVector& altsvc_vector) = 0; | 106 const SpdyAltSvcWireFormat::AlternativeServiceVector& altsvc_vector) = 0; |
| 107 | 107 |
| 108 // Called when a frame type we don't recognize is received. | 108 // Called when a frame type we don't recognize is received. |
| 109 // Return true if this appears to be a valid extension frame, false otherwise. | 109 // Return true if this appears to be a valid extension frame, false otherwise. |
| 110 // We distinguish between extension frames and nonsense by checking | 110 // We distinguish between extension frames and nonsense by checking |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 std::unique_ptr<GoAwayFields> goaway_fields_; | 283 std::unique_ptr<GoAwayFields> goaway_fields_; |
| 284 | 284 |
| 285 std::unique_ptr<HeaderCoalescer> coalescer_; | 285 std::unique_ptr<HeaderCoalescer> coalescer_; |
| 286 | 286 |
| 287 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); | 287 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 } // namespace net | 290 } // namespace net |
| 291 | 291 |
| 292 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 292 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| OLD | NEW |