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 <stddef.h> | 10 #include <stddef.h> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 const QuicReceivedPacket& packet); | 91 const QuicReceivedPacket& packet); |
92 | 92 |
93 // Called by streams when they want to write data to the peer. | 93 // Called by streams when they want to write data to the peer. |
94 // Returns a pair with the number of bytes consumed from data, and a boolean | 94 // Returns a pair with the number of bytes consumed from data, and a boolean |
95 // indicating if the fin bit was consumed. This does not indicate the data | 95 // indicating if the fin bit was consumed. This does not indicate the data |
96 // has been sent on the wire: it may have been turned into a packet and queued | 96 // has been sent on the wire: it may have been turned into a packet and queued |
97 // if the socket was unexpectedly blocked. | 97 // if the socket was unexpectedly blocked. |
98 // If provided, |ack_notifier_delegate| will be registered to be notified when | 98 // If provided, |ack_notifier_delegate| will be registered to be notified when |
99 // we have seen ACKs for all packets resulting from this call. | 99 // we have seen ACKs for all packets resulting from this call. |
100 virtual QuicConsumedData WritevData( | 100 virtual QuicConsumedData WritevData( |
| 101 ReliableQuicStream* stream, |
101 QuicStreamId id, | 102 QuicStreamId id, |
102 QuicIOVector iov, | 103 QuicIOVector iov, |
103 QuicStreamOffset offset, | 104 QuicStreamOffset offset, |
104 bool fin, | 105 bool fin, |
105 QuicAckListenerInterface* ack_notifier_delegate); | 106 QuicAckListenerInterface* ack_notifier_delegate); |
106 | 107 |
107 // Called by streams when they want to close the stream in both directions. | 108 // Called by streams when they want to close the stream in both directions. |
108 virtual void SendRstStream(QuicStreamId id, | 109 virtual void SendRstStream(QuicStreamId id, |
109 QuicRstStreamErrorCode error, | 110 QuicRstStreamErrorCode error, |
110 QuicStreamOffset bytes_written); | 111 QuicStreamOffset bytes_written); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // The stream id which was last popped in OnCanWrite, or 0, if not under the | 408 // The stream id which was last popped in OnCanWrite, or 0, if not under the |
408 // call stack of OnCanWrite. | 409 // call stack of OnCanWrite. |
409 QuicStreamId currently_writing_stream_id_; | 410 QuicStreamId currently_writing_stream_id_; |
410 | 411 |
411 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 412 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
412 }; | 413 }; |
413 | 414 |
414 } // namespace net | 415 } // namespace net |
415 | 416 |
416 #endif // NET_QUIC_QUIC_SESSION_H_ | 417 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |