OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ |
6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ | 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual int OnSendBody(); | 72 virtual int OnSendBody(); |
73 virtual int OnSendBodyComplete(int status, bool* eof); | 73 virtual int OnSendBodyComplete(int status, bool* eof); |
74 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 74 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
75 base::Time response_time, | 75 base::Time response_time, |
76 int status); | 76 int status); |
77 virtual void OnDataReceived(const char* buffer, int bytes); | 77 virtual void OnDataReceived(const char* buffer, int bytes); |
78 virtual void OnDataSent(int length); | 78 virtual void OnDataSent(int length); |
79 virtual void OnClose(int status); | 79 virtual void OnClose(int status); |
80 virtual void set_chunk_callback(ChunkCallback* callback); | 80 virtual void set_chunk_callback(ChunkCallback* callback); |
81 | 81 |
| 82 // Returns true if the underlying socket's transport protocol is SCTP. |
| 83 bool using_sctp() { return stream()->using_sctp(); } |
| 84 |
| 85 // Returns true if the underlying socket's transport protocol is SCTP and SPDY |
| 86 // control frames are sent on SCTP stream 0. |
| 87 bool using_sctp_control_stream() { |
| 88 return stream()->using_sctp_control_stream(); |
| 89 } |
| 90 |
82 private: | 91 private: |
83 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); | 92 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); |
84 | 93 |
85 // Call the user callback. | 94 // Call the user callback. |
86 void DoCallback(int rv); | 95 void DoCallback(int rv); |
87 | 96 |
88 void ScheduleBufferedReadCallback(); | 97 void ScheduleBufferedReadCallback(); |
89 | 98 |
90 // Returns true if the callback is invoked. | 99 // Returns true if the callback is invoked. |
91 bool DoBufferedReadCallback(); | 100 bool DoBufferedReadCallback(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 bool direct_; | 139 bool direct_; |
131 | 140 |
132 bool send_last_chunk_; | 141 bool send_last_chunk_; |
133 | 142 |
134 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 143 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
135 }; | 144 }; |
136 | 145 |
137 } // namespace net | 146 } // namespace net |
138 | 147 |
139 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 148 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
OLD | NEW |