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 // A QuicSession, which demuxes a single connection to individual streams. | 5 // A QuicSession, which demuxes a single connection to individual streams. |
6 | 6 |
7 #ifndef NET_QUIC_QUIC_SESSION_H_ | 7 #ifndef NET_QUIC_QUIC_SESSION_H_ |
8 #define NET_QUIC_QUIC_SESSION_H_ | 8 #define NET_QUIC_QUIC_SESSION_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Called by streams when they want to write data to the peer. | 94 // Called by streams when they want to write data to the peer. |
95 // Returns a pair with the number of bytes consumed from data, and a boolean | 95 // Returns a pair with the number of bytes consumed from data, and a boolean |
96 // indicating if the fin bit was consumed. This does not indicate the data | 96 // indicating if the fin bit was consumed. This does not indicate the data |
97 // has been sent on the wire: it may have been turned into a packet and queued | 97 // has been sent on the wire: it may have been turned into a packet and queued |
98 // if the socket was unexpectedly blocked. | 98 // if the socket was unexpectedly blocked. |
99 // If provided, |ack_notifier_delegate| will be registered to be notified when | 99 // If provided, |ack_notifier_delegate| will be registered to be notified when |
100 // we have seen ACKs for all packets resulting from this call. Not owned by | 100 // we have seen ACKs for all packets resulting from this call. Not owned by |
101 // this class. | 101 // this class. |
102 virtual QuicConsumedData WritevData( | 102 virtual QuicConsumedData WritevData( |
103 QuicStreamId id, | 103 QuicStreamId id, |
104 const struct iovec* iov, | 104 const IOVector& data, |
105 int iov_count, | |
106 QuicStreamOffset offset, | 105 QuicStreamOffset offset, |
107 bool fin, | 106 bool fin, |
108 QuicAckNotifier::DelegateInterface* ack_notifier_delegate); | 107 QuicAckNotifier::DelegateInterface* ack_notifier_delegate); |
109 | 108 |
110 // Writes |headers| for the stream |id| to the dedicated headers stream. | 109 // Writes |headers| for the stream |id| to the dedicated headers stream. |
111 // If |fin| is true, then no more data will be sent for the stream |id|. | 110 // If |fin| is true, then no more data will be sent for the stream |id|. |
112 size_t WriteHeaders(QuicStreamId id, | 111 size_t WriteHeaders(QuicStreamId id, |
113 const SpdyHeaderBlock& headers, | 112 const SpdyHeaderBlock& headers, |
114 bool fin); | 113 bool fin); |
115 | 114 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 329 |
331 // Indicate if there is pending data for the crypto stream. | 330 // Indicate if there is pending data for the crypto stream. |
332 bool has_pending_handshake_; | 331 bool has_pending_handshake_; |
333 | 332 |
334 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 333 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
335 }; | 334 }; |
336 | 335 |
337 } // namespace net | 336 } // namespace net |
338 | 337 |
339 #endif // NET_QUIC_QUIC_SESSION_H_ | 338 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |