summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_framer.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/spdy/spdy_framer.h')
-rw-r--r--net/spdy/spdy_framer.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index c97ba682..c050ac73 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -10,6 +10,7 @@
#else
#include <arpa/inet.h>
#endif
+#include <list>
#include <map>
#include <string>
@@ -40,6 +41,9 @@ void FramerSetEnableCompressionHelper(SpdyFramer* framer, bool compress);
// SYN_STREAM or SYN_REPLY frame.
typedef std::map<std::string, std::string> SpdyHeaderBlock;
+// A datastructure for holding a set of ID/value pairs for a SETTINGS frame.
+typedef std::list<std::pair<spdy::SettingsFlagsAndId, uint32> > SpdySettings;
+
// SpdyFramerVisitorInterface is a set of callbacks for the SpdyFramer.
// Implement this interface to receive event callbacks as frames are
// decoded from the framer.
@@ -155,6 +159,16 @@ class SpdyFramer {
static SpdyGoAwayControlFrame* CreateGoAway(
SpdyStreamId last_accepted_stream_id);
+ // Creates an instance of SpdySettingsControlFrame. The SETTINGS frame is
+ // used to communicate name/value pairs relevant to the communication channel.
+ // TODO(mbelshe): add the name/value pairs!!
+ static SpdySettingsControlFrame* CreateSettings(const SpdySettings& values);
+
+ // Given a SpdySettingsControlFrame, extract the settings.
+ // Returns true on successful parse, false otherwise.
+ static bool ParseSettings(const SpdySettingsControlFrame* frame,
+ SpdySettings* settings);
+
// Create a SpdySynReplyControlFrame.
// |stream_id| is the stream for this frame.
// |flags| is the flags to use with the data.