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_CORE_QUIC_SESSION_H_ | 7 #ifndef NET_QUIC_CORE_QUIC_SESSION_H_ |
8 #define NET_QUIC_CORE_QUIC_SESSION_H_ | 8 #define NET_QUIC_CORE_QUIC_SESSION_H_ |
9 | 9 |
10 #include <cstddef> | 10 #include <cstddef> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // indicating if the fin bit was consumed. This does not indicate the data | 115 // indicating if the fin bit was consumed. This does not indicate the data |
116 // has been sent on the wire: it may have been turned into a packet and queued | 116 // has been sent on the wire: it may have been turned into a packet and queued |
117 // if the socket was unexpectedly blocked. | 117 // if the socket was unexpectedly blocked. |
118 // If provided, |ack_notifier_delegate| will be registered to be notified when | 118 // If provided, |ack_notifier_delegate| will be registered to be notified when |
119 // we have seen ACKs for all packets resulting from this call. | 119 // we have seen ACKs for all packets resulting from this call. |
120 virtual QuicConsumedData WritevData( | 120 virtual QuicConsumedData WritevData( |
121 QuicStream* stream, | 121 QuicStream* stream, |
122 QuicStreamId id, | 122 QuicStreamId id, |
123 QuicIOVector iov, | 123 QuicIOVector iov, |
124 QuicStreamOffset offset, | 124 QuicStreamOffset offset, |
125 bool fin, | 125 StreamSendingState state, |
126 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); | 126 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); |
127 | 127 |
128 // Called by streams when they want to close the stream in both directions. | 128 // Called by streams when they want to close the stream in both directions. |
129 virtual void SendRstStream(QuicStreamId id, | 129 virtual void SendRstStream(QuicStreamId id, |
130 QuicRstStreamErrorCode error, | 130 QuicRstStreamErrorCode error, |
131 QuicStreamOffset bytes_written); | 131 QuicStreamOffset bytes_written); |
132 | 132 |
133 // Called when the session wants to go away and not accept any new streams. | 133 // Called when the session wants to go away and not accept any new streams. |
134 void SendGoAway(QuicErrorCode error_code, const std::string& reason); | 134 void SendGoAway(QuicErrorCode error_code, const std::string& reason); |
135 | 135 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 // The stream id which was last popped in OnCanWrite, or 0, if not under the | 441 // The stream id which was last popped in OnCanWrite, or 0, if not under the |
442 // call stack of OnCanWrite. | 442 // call stack of OnCanWrite. |
443 QuicStreamId currently_writing_stream_id_; | 443 QuicStreamId currently_writing_stream_id_; |
444 | 444 |
445 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 445 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
446 }; | 446 }; |
447 | 447 |
448 } // namespace net | 448 } // namespace net |
449 | 449 |
450 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ | 450 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ |
OLD | NEW |