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

Unified Diff: net/spdy/spdy_stream.h

Issue 6800009: Attn: Mike Belshe Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_stream.h
===================================================================
--- net/spdy/spdy_stream.h (revision 80449)
+++ net/spdy/spdy_stream.h (working copy)
@@ -165,6 +165,24 @@
base::Time GetRequestTime() const;
void SetRequestTime(base::Time t);
+ // TODO(jtl): Can we replace syn_reply_received_ with response_received_?
+ // The following methods are needed when using SCTP without multiple
+ // dictionaries (all SDPY control frames sent on SCTP stream 0), to handle the
+ // case where data arrives ahead of the SYN_REPLY.
+ bool syn_reply_received() { return syn_reply_received_; }
+ void set_syn_reply_received() { syn_reply_received_ = true; }
+ bool metrics_started() { return metrics_started_; }
+ void set_metrics_started() { metrics_started_ = true; }
+ bool close_pending() { return close_pending_; }
+ void set_close_pending() { close_pending_ = true; }
+
+ // Returns true if the underlying socket's transport protocol is SCTP.
+ bool using_sctp();
+
+ // Returns true if the underlying socket's transport protocol is SCTP and SPDY
+ // control frames are being sent on SCTP stream 0.
+ bool using_sctp_control_stream();
+
// Called by the SpdySession when a response (e.g. a SYN_STREAM or SYN_REPLY)
// has been received for this stream. Returns a status code.
int OnResponseReceived(const spdy::SpdyHeaderBlock& response);
@@ -300,6 +318,20 @@
linked_ptr<spdy::SpdyHeaderBlock> response_;
base::Time response_time_;
+ // When using SCTP without multiple dictionaries, control frames are sent on
+ // a control stream (SCTP stream 0). In the even of loss, data frames may
+ // arrive prior to the SYN_REPLY. We need to delay processing of data frames
+ // until the SYN_REPLY has been received
+ bool syn_reply_received_;
+ // When DATA can be received prior to the SYN_REPLY, we need to be able to
+ // start metrics on either the SYN_REPLY or the first DATA frame. We also
+ // need to know if it's already been started to avoid starting it a second
+ // time.
+ bool metrics_started_;
+ // If all data has arrived prior to the SYN_REPLY, we need to postpone closing
+ // the stream until the SYN_REPLY arrives.
+ bool close_pending_;
+
State io_state_;
// Since we buffer the response, we also buffer the response status.
« net/spdy/spdy_framer.cc ('K') | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698