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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override; | 363 bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override; |
364 bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override; | 364 bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override; |
365 bool OnBlockedFrame(const QuicBlockedFrame& frame) override; | 365 bool OnBlockedFrame(const QuicBlockedFrame& frame) override; |
366 void OnFecData(const QuicFecData& fec) override; | 366 void OnFecData(const QuicFecData& fec) override; |
367 void OnPacketComplete() override; | 367 void OnPacketComplete() override; |
368 | 368 |
369 // QuicPacketGenerator::DelegateInterface | 369 // QuicPacketGenerator::DelegateInterface |
370 bool ShouldGeneratePacket(TransmissionType transmission_type, | 370 bool ShouldGeneratePacket(TransmissionType transmission_type, |
371 HasRetransmittableData retransmittable, | 371 HasRetransmittableData retransmittable, |
372 IsHandshake handshake) override; | 372 IsHandshake handshake) override; |
373 QuicAckFrame* CreateAckFrame() override; | 373 void PopulateAckFrame(QuicAckFrame* ack) override; |
374 QuicStopWaitingFrame* CreateStopWaitingFrame() override; | 374 void PopulateStopWaitingFrame(QuicStopWaitingFrame* stop_waiting) override; |
375 void OnSerializedPacket(const SerializedPacket& packet) override; | 375 void OnSerializedPacket(const SerializedPacket& packet) override; |
376 | 376 |
377 // QuicSentPacketManager::NetworkChangeVisitor | 377 // QuicSentPacketManager::NetworkChangeVisitor |
378 void OnCongestionWindowChange() override; | 378 void OnCongestionWindowChange() override; |
379 void OnRttChange() override; | 379 void OnRttChange() override; |
380 | 380 |
381 // Called by the crypto stream when the handshake completes. In the server's | 381 // Called by the crypto stream when the handshake completes. In the server's |
382 // case this is when the SHLO has been ACKed. Clients call this on receipt of | 382 // case this is when the SHLO has been ACKed. Clients call this on receipt of |
383 // the SHLO. | 383 // the SHLO. |
384 void OnHandshakeComplete(); | 384 void OnHandshakeComplete(); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 void MaybeProcessUndecryptablePackets(); | 622 void MaybeProcessUndecryptablePackets(); |
623 | 623 |
624 // If a packet can be revived from the current FEC group, then | 624 // If a packet can be revived from the current FEC group, then |
625 // revive and process the packet. | 625 // revive and process the packet. |
626 void MaybeProcessRevivedPacket(); | 626 void MaybeProcessRevivedPacket(); |
627 | 627 |
628 void ProcessAckFrame(const QuicAckFrame& incoming_ack); | 628 void ProcessAckFrame(const QuicAckFrame& incoming_ack); |
629 | 629 |
630 void ProcessStopWaitingFrame(const QuicStopWaitingFrame& stop_waiting); | 630 void ProcessStopWaitingFrame(const QuicStopWaitingFrame& stop_waiting); |
631 | 631 |
632 // Update |stop_waiting| for an outgoing ack. | |
633 void UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting); | |
634 | |
635 // Queues an ack or sets the ack alarm when an incoming packet arrives that | 632 // Queues an ack or sets the ack alarm when an incoming packet arrives that |
636 // should be acked. | 633 // should be acked. |
637 void MaybeQueueAck(); | 634 void MaybeQueueAck(); |
638 | 635 |
639 // Checks if the last packet should instigate an ack. | 636 // Checks if the last packet should instigate an ack. |
640 bool ShouldLastPacketInstigateAck() const; | 637 bool ShouldLastPacketInstigateAck() const; |
641 | 638 |
642 // Checks if the peer is waiting for packets that have been given up on, and | 639 // Checks if the peer is waiting for packets that have been given up on, and |
643 // therefore an ack frame should be sent with a larger least_unacked. | 640 // therefore an ack frame should be sent with a larger least_unacked. |
644 void UpdateStopWaitingCount(); | 641 void UpdateStopWaitingCount(); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 836 |
840 // True if this is a secure QUIC connection. | 837 // True if this is a secure QUIC connection. |
841 bool is_secure_; | 838 bool is_secure_; |
842 | 839 |
843 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 840 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
844 }; | 841 }; |
845 | 842 |
846 } // namespace net | 843 } // namespace net |
847 | 844 |
848 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 845 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |