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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 public: | 45 public: |
46 virtual ~Visitor() {} | 46 virtual ~Visitor() {} |
47 | 47 |
48 // Called when the connection is closed after the streams have been closed. | 48 // Called when the connection is closed after the streams have been closed. |
49 virtual void OnConnectionClosed(QuicConnectionId connection_id, | 49 virtual void OnConnectionClosed(QuicConnectionId connection_id, |
50 QuicErrorCode error, | 50 QuicErrorCode error, |
51 const std::string& error_details) = 0; | 51 const std::string& error_details) = 0; |
52 | 52 |
53 // Called when the session has become write blocked. | 53 // Called when the session has become write blocked. |
54 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0; | 54 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0; |
| 55 |
| 56 // Called when the session receives reset on a stream from the peer. |
| 57 virtual void OnRstStreamReceived(const QuicRstStreamFrame& frame) = 0; |
55 }; | 58 }; |
56 | 59 |
57 // CryptoHandshakeEvent enumerates the events generated by a QuicCryptoStream. | 60 // CryptoHandshakeEvent enumerates the events generated by a QuicCryptoStream. |
58 enum CryptoHandshakeEvent { | 61 enum CryptoHandshakeEvent { |
59 // ENCRYPTION_FIRST_ESTABLISHED indicates that a full client hello has been | 62 // ENCRYPTION_FIRST_ESTABLISHED indicates that a full client hello has been |
60 // sent by a client and that subsequent packets will be encrypted. (Client | 63 // sent by a client and that subsequent packets will be encrypted. (Client |
61 // only.) | 64 // only.) |
62 ENCRYPTION_FIRST_ESTABLISHED, | 65 ENCRYPTION_FIRST_ESTABLISHED, |
63 // ENCRYPTION_REESTABLISHED indicates that a client hello was rejected by | 66 // ENCRYPTION_REESTABLISHED indicates that a client hello was rejected by |
64 // the server and thus the encryption key has been updated. Therefore the | 67 // the server and thus the encryption key has been updated. Therefore the |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 443 |
441 // Latched value of quic_reloadable_flag_quic_flow_control_invariant. | 444 // Latched value of quic_reloadable_flag_quic_flow_control_invariant. |
442 const bool flow_control_invariant_; | 445 const bool flow_control_invariant_; |
443 | 446 |
444 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 447 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
445 }; | 448 }; |
446 | 449 |
447 } // namespace net | 450 } // namespace net |
448 | 451 |
449 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ | 452 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ |
OLD | NEW |