| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The base class for client/server reliable streams. | 5 // The base class for client/server reliable streams. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
| 8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
| 9 | 9 |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 QuicConsumedData WriteOrBuffer(base::StringPiece data, bool fin); | 160 QuicConsumedData WriteOrBuffer(base::StringPiece data, bool fin); |
| 161 | 161 |
| 162 // Sends as much of 'data' to the connection as the connection will consume. | 162 // Sends as much of 'data' to the connection as the connection will consume. |
| 163 // Returns the number of bytes consumed by the connection. | 163 // Returns the number of bytes consumed by the connection. |
| 164 QuicConsumedData WriteDataInternal(base::StringPiece data, bool fin); | 164 QuicConsumedData WriteDataInternal(base::StringPiece data, bool fin); |
| 165 | 165 |
| 166 // Sends as many bytes in the first |count| buffers of |iov| to the connection | 166 // Sends as many bytes in the first |count| buffers of |iov| to the connection |
| 167 // as the connection will consume. | 167 // as the connection will consume. |
| 168 // Returns the number of bytes consumed by the connection. | 168 // Returns the number of bytes consumed by the connection. |
| 169 QuicConsumedData WritevDataInternal(const struct iovec* iov, | 169 QuicConsumedData WritevDataInternal(const struct iovec* iov, |
| 170 int count, | 170 int iov_count, |
| 171 bool fin); | 171 bool fin); |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 friend class test::ReliableQuicStreamPeer; | 174 friend class test::ReliableQuicStreamPeer; |
| 175 friend class QuicStreamUtils; | 175 friend class QuicStreamUtils; |
| 176 | 176 |
| 177 uint32 StripPriorityAndHeaderId(const char* data, uint32 data_len); | 177 uint32 StripPriorityAndHeaderId(const char* data, uint32 data_len); |
| 178 | 178 |
| 179 std::list<string> queued_data_; | 179 std::list<string> queued_data_; |
| 180 | 180 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 // True if the priority has been read, false otherwise. | 218 // True if the priority has been read, false otherwise. |
| 219 bool priority_parsed_; | 219 bool priority_parsed_; |
| 220 bool fin_buffered_; | 220 bool fin_buffered_; |
| 221 bool fin_sent_; | 221 bool fin_sent_; |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 } // namespace net | 224 } // namespace net |
| 225 | 225 |
| 226 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 226 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
| OLD | NEW |