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. |