Chromium Code Reviews| Index: net/spdy/spdy_session.h |
| =================================================================== |
| --- net/spdy/spdy_session.h (revision 104856) |
| +++ net/spdy/spdy_session.h (working copy) |
| @@ -104,6 +104,9 @@ |
| // NOTE: This function can have false negatives on some platforms. |
| bool VerifyDomainAuthentication(const std::string& domain); |
| + // Send the PING frame for |stream_id|. |
| + int WritePingFrame(spdy::SpdyStreamId stream_id); |
| + |
| // Send the SYN frame for |stream_id|. |
| int WriteSynStream( |
| spdy::SpdyStreamId stream_id, |
| @@ -195,6 +198,14 @@ |
| return !active_streams_.empty(); |
| } |
| + // Returns true if we have received a ping response from server for the ping |
| + // message we had sent. |
| + bool DidLastPingWork() const { |
| + if (sent_ping_) |
|
willchan no longer on Chromium
2011/10/12 05:41:06
This isn't good enough, you're going to need to tr
ramant (doing other things)
2011/10/13 21:41:14
Done.
|
| + return received_ping_; |
| + return true; |
| + } |
| + |
| // Access to the number of active and pending streams. These are primarily |
| // available for testing and diagnostics. |
| size_t num_active_streams() const { return active_streams_.size(); } |
| @@ -271,6 +282,7 @@ |
| const linked_ptr<spdy::SpdyHeaderBlock>& headers); |
| void OnRst(const spdy::SpdyRstStreamControlFrame& frame); |
| void OnGoAway(const spdy::SpdyGoAwayControlFrame& frame); |
| + void OnPing(const spdy::SpdyPingControlFrame& frame); |
| void OnSettings(const spdy::SpdySettingsControlFrame& frame); |
| void OnWindowUpdate(const spdy::SpdyWindowUpdateControlFrame& frame); |
| @@ -431,6 +443,9 @@ |
| // frame. |
| int stalled_streams_; // Count of streams that were ever stalled. |
| + bool sent_ping_; // Did this session send a ping message. |
| + bool received_ping_; // Did this session receive a ping message. |
| + |
| // Initial send window size for the session; can be changed by an |
| // arriving SETTINGS frame; newly created streams use this value for the |
| // initial send window size. |