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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // Called when the connection failed to write because the socket was blocked. | 87 // Called when the connection failed to write because the socket was blocked. |
88 virtual void OnWriteBlocked() = 0; | 88 virtual void OnWriteBlocked() = 0; |
89 | 89 |
90 // Called once a specific QUIC version is agreed by both endpoints. | 90 // Called once a specific QUIC version is agreed by both endpoints. |
91 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) = 0; | 91 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) = 0; |
92 | 92 |
93 // Called when a blocked socket becomes writable. | 93 // Called when a blocked socket becomes writable. |
94 virtual void OnCanWrite() = 0; | 94 virtual void OnCanWrite() = 0; |
95 | 95 |
96 // Called to ask if any writes are pending in this visitor. Writes may be | 96 // Called to ask if the visitor wants to schedule write resumption as it has |
97 // pending because they were write-blocked, congestion-throttled or | 97 // both has pending data to write, and is able to write (e.g. based on flow |
98 // yielded to other connections. | 98 // control limits). |
99 virtual bool HasPendingWrites() const = 0; | 99 // Writes may be pending because they were write-blocked, congestion-throttled |
| 100 // or yielded to other connections. |
| 101 virtual bool WillingAndAbleToWrite() const = 0; |
100 | 102 |
101 // Called to ask if any handshake messages are pending in this visitor. | 103 // Called to ask if any handshake messages are pending in this visitor. |
102 virtual bool HasPendingHandshake() const = 0; | 104 virtual bool HasPendingHandshake() const = 0; |
103 | 105 |
104 // Called to ask if any streams are open in this visitor, excluding the | 106 // Called to ask if any streams are open in this visitor, excluding the |
105 // reserved crypto and headers stream. | 107 // reserved crypto and headers stream. |
106 virtual bool HasOpenDataStreams() const = 0; | 108 virtual bool HasOpenDataStreams() const = 0; |
107 }; | 109 }; |
108 | 110 |
109 // Interface which gets callbacks from the QuicConnection at interesting | 111 // Interface which gets callbacks from the QuicConnection at interesting |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 // If non-empty this contains the set of versions received in a | 753 // If non-empty this contains the set of versions received in a |
752 // version negotiation packet. | 754 // version negotiation packet. |
753 QuicVersionVector server_supported_versions_; | 755 QuicVersionVector server_supported_versions_; |
754 | 756 |
755 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 757 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
756 }; | 758 }; |
757 | 759 |
758 } // namespace net | 760 } // namespace net |
759 | 761 |
760 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 762 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |