Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: net/spdy/spdy_framer.h

Issue 2794063002: Add a SpdyFramer extension API implementation. (Closed)
Patch Set: Add BeginNewExtensionFrame. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 int weight, 206 int weight,
207 bool exclusive) {} 207 bool exclusive) {}
208 208
209 // Called when a frame type we don't recognize is received. 209 // Called when a frame type we don't recognize is received.
210 // Return true if this appears to be a valid extension frame, false otherwise. 210 // Return true if this appears to be a valid extension frame, false otherwise.
211 // We distinguish between extension frames and nonsense by checking 211 // We distinguish between extension frames and nonsense by checking
212 // whether the stream id is valid. 212 // whether the stream id is valid.
213 virtual bool OnUnknownFrame(SpdyStreamId stream_id, uint8_t frame_type) = 0; 213 virtual bool OnUnknownFrame(SpdyStreamId stream_id, uint8_t frame_type) = 0;
214 }; 214 };
215 215
216 class SpdyFrameSequence {
217 public:
218 virtual ~SpdyFrameSequence() {}
219
220 // Serializes the next frame in the sequence to |output|. Returns the number
221 // of bytes written to |output|.
222 virtual size_t NextFrame(ZeroCopyOutputBuffer* output) = 0;
223
224 // Returns true iff there is at least one more frame in the sequence.
225 virtual bool HasNextFrame() const = 0;
226 };
227
216 class ExtensionVisitorInterface { 228 class ExtensionVisitorInterface {
217 public: 229 public:
218 virtual ~ExtensionVisitorInterface() {} 230 virtual ~ExtensionVisitorInterface() {}
219 231
220 // Called when non-standard SETTINGS are received. 232 // Called when non-standard SETTINGS are received.
221 virtual void OnSetting(uint16_t id, uint32_t value) = 0; 233 virtual void OnSetting(uint16_t id, uint32_t value) = 0;
222 234
223 // Called when non-standard frames are received. 235 // Called when non-standard frames are received.
224 virtual bool OnFrameHeader(SpdyStreamId stream_id, 236 virtual bool OnFrameHeader(SpdyStreamId stream_id,
225 size_t length, 237 size_t length,
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // rather than reading all available input. 890 // rather than reading all available input.
879 bool process_single_input_frame_ = false; 891 bool process_single_input_frame_ = false;
880 892
881 // Latched value of FLAGS_chromium_http2_flag_remove_rewritelength. 893 // Latched value of FLAGS_chromium_http2_flag_remove_rewritelength.
882 bool skip_rewritelength_ = false; 894 bool skip_rewritelength_ = false;
883 }; 895 };
884 896
885 } // namespace net 897 } // namespace net
886 898
887 #endif // NET_SPDY_SPDY_FRAMER_H_ 899 #endif // NET_SPDY_SPDY_FRAMER_H_
OLDNEW
« net/spdy/spdy_frame_builder.h ('K') | « net/spdy/spdy_frame_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698