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 entity that handles framing writes for a Quic client or server. | 5 // The entity that handles framing writes for a Quic client or server. |
6 // Each QuicSession will have a connection associated with it. | 6 // Each QuicSession will have a connection associated with it. |
7 // | 7 // |
8 // On the server side, the Dispatcher handles the raw reads, and hands off | 8 // On the server side, the Dispatcher handles the raw reads, and hands off |
9 // packets via ProcessUdpPacket for framing and processing. | 9 // packets via ProcessUdpPacket for framing and processing. |
10 // | 10 // |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Called when the connection is closed either locally by the framer, or | 76 // Called when the connection is closed either locally by the framer, or |
77 // remotely by the peer. | 77 // remotely by the peer. |
78 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) = 0; | 78 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) = 0; |
79 | 79 |
80 // Called when the connection failed to write because the socket was blocked. | 80 // Called when the connection failed to write because the socket was blocked. |
81 virtual void OnWriteBlocked() = 0; | 81 virtual void OnWriteBlocked() = 0; |
82 | 82 |
83 // Called once a specific QUIC version is agreed by both endpoints. | 83 // Called once a specific QUIC version is agreed by both endpoints. |
84 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) = 0; | 84 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) = 0; |
85 | 85 |
86 // Indicates a new QuicConfig has been negotiated. | |
87 virtual void OnConfigNegotiated() = 0; | |
88 | |
89 // Called when a blocked socket becomes writable. If all pending bytes for | 86 // Called when a blocked socket becomes writable. If all pending bytes for |
90 // this visitor are consumed by the connection successfully this should | 87 // this visitor are consumed by the connection successfully this should |
91 // return true, otherwise it should return false. | 88 // return true, otherwise it should return false. |
92 virtual bool OnCanWrite() = 0; | 89 virtual bool OnCanWrite() = 0; |
93 | 90 |
94 // Called to ask if any handshake messages are pending in this visitor. | 91 // Called to ask if any handshake messages are pending in this visitor. |
95 virtual bool HasPendingHandshake() const = 0; | 92 virtual bool HasPendingHandshake() const = 0; |
96 }; | 93 }; |
97 | 94 |
98 // Interface which gets callbacks from the QuicConnection at interesting | 95 // Interface which gets callbacks from the QuicConnection at interesting |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 // If non-empty this contains the set of versions received in a | 712 // If non-empty this contains the set of versions received in a |
716 // version negotiation packet. | 713 // version negotiation packet. |
717 QuicVersionVector server_supported_versions_; | 714 QuicVersionVector server_supported_versions_; |
718 | 715 |
719 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 716 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
720 }; | 717 }; |
721 | 718 |
722 } // namespace net | 719 } // namespace net |
723 | 720 |
724 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 721 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |