summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_stream.h
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 22:04:03 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 22:04:03 +0000
commitd083585002893abaa6172c361aa04306a0e4d396 (patch)
tree75ff77ddf51d68d450ee0e7d56192409e44bcf97 /net/spdy/spdy_stream.h
parent95c97199c4406036b216d74e4ba3a5c57c0081a2 (diff)
downloadchromium_src-d083585002893abaa6172c361aa04306a0e4d396.zip
chromium_src-d083585002893abaa6172c361aa04306a0e4d396.tar.gz
chromium_src-d083585002893abaa6172c361aa04306a0e4d396.tar.bz2
Update server push to allow use of HEADERS frame.
- Sync'd server changes for SPDY protocol and framer. - Adds HEADERS support & smaller header frame support. - Changes field name from "path" to "url" for pushed streams. - Changes existing semantics in SpdyStream and SpdyHttpStream with how the OnResponseReceived callback works and with how headers are parsed to reflect multi-frame arrival of headers. Other changes: - Reworked the StaticSocketDataProvider interface slightly so that we can share code between tests using DelayedSocketData or DeterministicSocketData - Tidy up net_log for pushed streams with associated-stream id logging and format fixes for SPDY_STREAM. BUG=none TEST=spdy_framer_test,spdy_network_transaction_unittest(s) Review URL: http://codereview.chromium.org/5248001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_stream.h')
-rw-r--r--net/spdy/spdy_stream.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 4e30a60..d3dd242 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -53,8 +53,12 @@ class SpdyStream : public base::RefCounted<SpdyStream> {
// Returns true if no more data to be sent.
virtual bool OnSendBodyComplete(int status) = 0;
- // Called when SYN_STREAM or SYN_REPLY received. |status| indicates network
- // error. Returns network error code.
+ // Called when the SYN_STREAM, SYN_REPLY, or HEADERS frames are received.
+ // Normal streams will receive a SYN_REPLY and optional HEADERS frames.
+ // Pushed streams will receive a SYN_STREAM and optional HEADERS frames.
+ // Because a stream may have a SYN_* frame and multiple HEADERS frames,
+ // this callback may be called multiple times.
+ // |status| indicates network error. Returns network error code.
virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response,
base::Time response_time,
int status) = 0;
@@ -157,6 +161,10 @@ class SpdyStream : public base::RefCounted<SpdyStream> {
// has been received for this stream. Returns a status code.
int OnResponseReceived(const spdy::SpdyHeaderBlock& response);
+ // Called by the SpdySession when late-bound headers are received for a
+ // stream. Returns a status code.
+ int OnHeaders(const spdy::SpdyHeaderBlock& headers);
+
// Called by the SpdySession when response data has been received for this
// stream. This callback may be called multiple times as data arrives
// from the network, and will never be called prior to OnResponseReceived.