| 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_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_SPDY_FRAMER_H_ |
| 6 #define NET_SPDY_SPDY_FRAMER_H_ | 6 #define NET_SPDY_SPDY_FRAMER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // |stream_id| The stream receiving data. | 112 // |stream_id| The stream receiving data. |
| 113 // |data| A buffer containing the data received. | 113 // |data| A buffer containing the data received. |
| 114 // |len| The length of the data buffer. | 114 // |len| The length of the data buffer. |
| 115 // When the other side has finished sending data on this stream, | 115 // When the other side has finished sending data on this stream, |
| 116 // this method will be called with a zero-length buffer. | 116 // this method will be called with a zero-length buffer. |
| 117 virtual void OnStreamFrameData(SpdyStreamId stream_id, | 117 virtual void OnStreamFrameData(SpdyStreamId stream_id, |
| 118 const char* data, | 118 const char* data, |
| 119 size_t len, | 119 size_t len, |
| 120 bool fin) = 0; | 120 bool fin) = 0; |
| 121 | 121 |
| 122 // Called when the other side has finished sending data on this stream. |
| 123 // |stream_id| The stream that was receivin data. |
| 124 virtual void OnStreamEnd(SpdyStreamId stream_id) = 0; |
| 125 |
| 122 // Called when padding is received (padding length field or padding octets). | 126 // Called when padding is received (padding length field or padding octets). |
| 123 // |stream_id| The stream receiving data. | 127 // |stream_id| The stream receiving data. |
| 124 // |len| The number of padding octets. | 128 // |len| The number of padding octets. |
| 125 virtual void OnStreamPadding(SpdyStreamId stream_id, size_t len) = 0; | 129 virtual void OnStreamPadding(SpdyStreamId stream_id, size_t len) = 0; |
| 126 | 130 |
| 127 // Called just before processing the payload of a frame containing header | 131 // Called just before processing the payload of a frame containing header |
| 128 // data. Should return an implementation of SpdyHeadersHandlerInterface that | 132 // data. Should return an implementation of SpdyHeadersHandlerInterface that |
| 129 // will receive headers for stream |stream_id|. The caller will not take | 133 // will receive headers for stream |stream_id|. The caller will not take |
| 130 // ownership of the headers handler. The same instance should be returned | 134 // ownership of the headers handler. The same instance should be returned |
| 131 // for all header frames comprising a logical header block (i.e. until | 135 // for all header frames comprising a logical header block (i.e. until |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 bool end_stream_when_done_; | 798 bool end_stream_when_done_; |
| 795 | 799 |
| 796 // If true, then ProcessInput returns after processing a full frame, | 800 // If true, then ProcessInput returns after processing a full frame, |
| 797 // rather than reading all available input. | 801 // rather than reading all available input. |
| 798 bool process_single_input_frame_ = false; | 802 bool process_single_input_frame_ = false; |
| 799 }; | 803 }; |
| 800 | 804 |
| 801 } // namespace net | 805 } // namespace net |
| 802 | 806 |
| 803 #endif // NET_SPDY_SPDY_FRAMER_H_ | 807 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |