Chromium Code Reviews| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 virtual void OnCongestionWindowChange(QuicTime now) = 0; | 130 virtual void OnCongestionWindowChange(QuicTime now) = 0; |
| 131 | 131 |
| 132 // Called when the connection receives a packet from a migrated client. | 132 // Called when the connection receives a packet from a migrated client. |
| 133 virtual void OnConnectionMigration() = 0; | 133 virtual void OnConnectionMigration() = 0; |
| 134 | 134 |
| 135 // Called after OnStreamFrame, OnRstStream, OnGoAway, OnWindowUpdateFrame, | 135 // Called after OnStreamFrame, OnRstStream, OnGoAway, OnWindowUpdateFrame, |
| 136 // OnBlockedFrame, and OnCanWrite to allow post-processing once the work has | 136 // OnBlockedFrame, and OnCanWrite to allow post-processing once the work has |
| 137 // been done. | 137 // been done. |
| 138 virtual void PostProcessAfterData() = 0; | 138 virtual void PostProcessAfterData() = 0; |
| 139 | 139 |
| 140 // Called when the the peer seems unreachable over the current path. | |
| 141 virtual void OnPathDegrading() = 0; | |
|
Ryan Hamilton
2016/02/04 20:22:20
Isn't this part of the internal CL? Can you exclud
| |
| 142 | |
| 140 // Called to ask if the visitor wants to schedule write resumption as it both | 143 // Called to ask if the visitor wants to schedule write resumption as it both |
| 141 // has pending data to write, and is able to write (e.g. based on flow control | 144 // has pending data to write, and is able to write (e.g. based on flow control |
| 142 // limits). | 145 // limits). |
| 143 // Writes may be pending because they were write-blocked, congestion-throttled | 146 // Writes may be pending because they were write-blocked, congestion-throttled |
| 144 // or yielded to other connections. | 147 // or yielded to other connections. |
| 145 virtual bool WillingAndAbleToWrite() const = 0; | 148 virtual bool WillingAndAbleToWrite() const = 0; |
| 146 | 149 |
| 147 // Called to ask if any handshake messages are pending in this visitor. | 150 // Called to ask if any handshake messages are pending in this visitor. |
| 148 virtual bool HasPendingHandshake() const = 0; | 151 virtual bool HasPendingHandshake() const = 0; |
| 149 | 152 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 458 void PopulateAckFrame(QuicAckFrame* ack) override; | 461 void PopulateAckFrame(QuicAckFrame* ack) override; |
| 459 void PopulateStopWaitingFrame(QuicStopWaitingFrame* stop_waiting) override; | 462 void PopulateStopWaitingFrame(QuicStopWaitingFrame* stop_waiting) override; |
| 460 | 463 |
| 461 // QuicPacketCreator::DelegateInterface | 464 // QuicPacketCreator::DelegateInterface |
| 462 void OnSerializedPacket(SerializedPacket* packet) override; | 465 void OnSerializedPacket(SerializedPacket* packet) override; |
| 463 void OnResetFecGroup() override; | 466 void OnResetFecGroup() override; |
| 464 | 467 |
| 465 // QuicSentPacketManager::NetworkChangeVisitor | 468 // QuicSentPacketManager::NetworkChangeVisitor |
| 466 void OnCongestionWindowChange() override; | 469 void OnCongestionWindowChange() override; |
| 467 void OnRttChange() override; | 470 void OnRttChange() override; |
| 471 void OnPathDegrading() override; | |
| 468 | 472 |
| 469 // Called by the crypto stream when the handshake completes. In the server's | 473 // Called by the crypto stream when the handshake completes. In the server's |
| 470 // case this is when the SHLO has been ACKed. Clients call this on receipt of | 474 // case this is when the SHLO has been ACKed. Clients call this on receipt of |
| 471 // the SHLO. | 475 // the SHLO. |
| 472 void OnHandshakeComplete(); | 476 void OnHandshakeComplete(); |
| 473 | 477 |
| 474 // Accessors | 478 // Accessors |
| 475 void set_visitor(QuicConnectionVisitorInterface* visitor) { | 479 void set_visitor(QuicConnectionVisitorInterface* visitor) { |
| 476 visitor_ = visitor; | 480 visitor_ = visitor; |
| 477 } | 481 } |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1029 | 1033 |
| 1030 // If true, multipath is enabled for this connection. | 1034 // If true, multipath is enabled for this connection. |
| 1031 bool multipath_enabled_; | 1035 bool multipath_enabled_; |
| 1032 | 1036 |
| 1033 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1037 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 1034 }; | 1038 }; |
| 1035 | 1039 |
| 1036 } // namespace net | 1040 } // namespace net |
| 1037 | 1041 |
| 1038 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 1042 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |