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_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
6 #define NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 6 #define NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void OnStreamFrameData(SpdyStreamId stream_id, | 102 void OnStreamFrameData(SpdyStreamId stream_id, |
103 const char* data, | 103 const char* data, |
104 size_t len, | 104 size_t len, |
105 bool fin) override; | 105 bool fin) override; |
106 | 106 |
107 // Called when padding is received (padding length field or padding octets). | 107 // Called when padding is received (padding length field or padding octets). |
108 // |stream_id| The stream receiving data. | 108 // |stream_id| The stream receiving data. |
109 // |len| The number of padding octets. | 109 // |len| The number of padding octets. |
110 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override; | 110 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override; |
111 | 111 |
112 // Called just before processing the payload of a frame containing header | |
113 // data. Should return an implementation of SpdyHeadersHandlerInterface that | |
114 // will receive headers for stream |stream_id|. The caller will not take | |
115 // ownership of the headers handler. The same instance should be returned | |
116 // for all header frames comprising a logical header block (i.e. until | |
117 // OnHeaderFrameEnd() is called with end_headers == true). | |
118 SpdyHeadersHandlerInterface* OnHeaderFrameStart( | |
119 SpdyStreamId stream_id) override; | |
120 | |
121 // Called after processing the payload of a frame containing header data. | |
122 // |end_headers| is true if there will not be any subsequent CONTINUATION | |
123 // frames. | |
124 void OnHeaderFrameEnd(SpdyStreamId stream_id, bool end_headers) override; | |
125 | |
126 // Called when a SETTINGS frame is received. | 112 // Called when a SETTINGS frame is received. |
127 // |clear_persisted| True if the respective flag is set on the SETTINGS frame. | 113 // |clear_persisted| True if the respective flag is set on the SETTINGS frame. |
128 void OnSettings(bool clear_persisted) override {} | 114 void OnSettings(bool clear_persisted) override {} |
129 | 115 |
130 // Called when an individual setting within a SETTINGS frame has been parsed | 116 // Called when an individual setting within a SETTINGS frame has been parsed |
131 // and validated. | 117 // and validated. |
132 void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {} | 118 void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {} |
133 | 119 |
134 // Called when a PING frame has been parsed. | 120 // Called when a PING frame has been parsed. |
135 void OnPing(SpdyPingId unique_id, bool is_ack) override {} | 121 void OnPing(SpdyPingId unique_id, bool is_ack) override {} |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 typedef std::map<uint32, SMInterface*> StreamToSmif; | 217 typedef std::map<uint32, SMInterface*> StreamToSmif; |
232 StreamToSmif stream_to_smif_; | 218 StreamToSmif stream_to_smif_; |
233 bool close_on_error_; | 219 bool close_on_error_; |
234 | 220 |
235 static std::string forward_ip_header_; | 221 static std::string forward_ip_header_; |
236 }; | 222 }; |
237 | 223 |
238 } // namespace net | 224 } // namespace net |
239 | 225 |
240 #endif // NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 226 #endif // NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
OLD | NEW |