summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_framer.h
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 22:24:45 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 22:24:45 +0000
commit4e1d0347528d3be39ff4854a1b9268accb001282 (patch)
tree3f0a617f0071096e45be3a1d2890e7691c542d37 /net/spdy/spdy_framer.h
parent4cccc224e222ceeb765ce93d5bb40223b210c472 (diff)
downloadchromium_src-4e1d0347528d3be39ff4854a1b9268accb001282.zip
chromium_src-4e1d0347528d3be39ff4854a1b9268accb001282.tar.gz
chromium_src-4e1d0347528d3be39ff4854a1b9268accb001282.tar.bz2
Implement protocol definitions for the SPDY SETTINGS frame (previously
labeled the HELLO frame). BUG=none TEST=SpdyProtocolTest. Review URL: http://codereview.chromium.org/1569018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43535 0039d316-1c4b-4281-b951-d872f2087c98
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.