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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 virtual void OnConnectionMigration(PeerAddressChangeType type) = 0; | 134 virtual void OnConnectionMigration(PeerAddressChangeType type) = 0; |
135 | 135 |
136 // Called when the peer seems unreachable over the current path. | 136 // Called when the peer seems unreachable over the current path. |
137 virtual void OnPathDegrading() = 0; | 137 virtual void OnPathDegrading() = 0; |
138 | 138 |
139 // Called after OnStreamFrame, OnRstStream, OnGoAway, OnWindowUpdateFrame, | 139 // Called after OnStreamFrame, OnRstStream, OnGoAway, OnWindowUpdateFrame, |
140 // OnBlockedFrame, and OnCanWrite to allow post-processing once the work has | 140 // OnBlockedFrame, and OnCanWrite to allow post-processing once the work has |
141 // been done. | 141 // been done. |
142 virtual void PostProcessAfterData() = 0; | 142 virtual void PostProcessAfterData() = 0; |
143 | 143 |
| 144 // Called when the connection sends ack after |
| 145 // kMaxConsecutiveNonRetransmittablePackets consecutive not retransmittable |
| 146 // packets sent. To instigate an ack from peer, a retransmittable frame needs |
| 147 // to be added. |
| 148 virtual void OnAckNeedsRetransmittableFrame() = 0; |
| 149 |
144 // Called to ask if the visitor wants to schedule write resumption as it both | 150 // Called to ask if the visitor wants to schedule write resumption as it both |
145 // has pending data to write, and is able to write (e.g. based on flow control | 151 // has pending data to write, and is able to write (e.g. based on flow control |
146 // limits). | 152 // limits). |
147 // Writes may be pending because they were write-blocked, congestion-throttled | 153 // Writes may be pending because they were write-blocked, congestion-throttled |
148 // or yielded to other connections. | 154 // or yielded to other connections. |
149 virtual bool WillingAndAbleToWrite() const = 0; | 155 virtual bool WillingAndAbleToWrite() const = 0; |
150 | 156 |
151 // Called to ask if any handshake messages are pending in this visitor. | 157 // Called to ask if any handshake messages are pending in this visitor. |
152 virtual bool HasPendingHandshake() const = 0; | 158 virtual bool HasPendingHandshake() const = 0; |
153 | 159 |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 // Whether a GoAway has been received. | 1081 // Whether a GoAway has been received. |
1076 bool goaway_received_; | 1082 bool goaway_received_; |
1077 | 1083 |
1078 // Indicates whether a write error is encountered currently. This is used to | 1084 // Indicates whether a write error is encountered currently. This is used to |
1079 // avoid infinite write errors. | 1085 // avoid infinite write errors. |
1080 bool write_error_occured_; | 1086 bool write_error_occured_; |
1081 | 1087 |
1082 // Indicates not to send or process stop waiting frames. | 1088 // Indicates not to send or process stop waiting frames. |
1083 bool no_stop_waiting_frames_; | 1089 bool no_stop_waiting_frames_; |
1084 | 1090 |
| 1091 // Consecutive number of sent packets which have no retransmittable frames. |
| 1092 size_t consecutive_num_packets_with_no_retransmittable_frames_; |
| 1093 |
1085 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1094 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
1086 }; | 1095 }; |
1087 | 1096 |
1088 } // namespace net | 1097 } // namespace net |
1089 | 1098 |
1090 #endif // NET_QUIC_CORE_QUIC_CONNECTION_H_ | 1099 #endif // NET_QUIC_CORE_QUIC_CONNECTION_H_ |
OLD | NEW |