| 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 // safely done until the packet is validated. Returns true if the packet | 649 // safely done until the packet is validated. Returns true if the packet |
| 650 // can be handled, false otherwise. | 650 // can be handled, false otherwise. |
| 651 virtual bool ProcessValidatedPacket(); | 651 virtual bool ProcessValidatedPacket(); |
| 652 | 652 |
| 653 // Send a packet to the peer, and takes ownership of the packet if the packet | 653 // Send a packet to the peer, and takes ownership of the packet if the packet |
| 654 // cannot be written immediately. | 654 // cannot be written immediately. |
| 655 virtual void SendOrQueuePacket(QueuedPacket packet); | 655 virtual void SendOrQueuePacket(QueuedPacket packet); |
| 656 | 656 |
| 657 QuicConnectionHelperInterface* helper() { return helper_; } | 657 QuicConnectionHelperInterface* helper() { return helper_; } |
| 658 | 658 |
| 659 // On peer address changes, determine and return the change type. |
| 660 virtual PeerAddressChangeType DeterminePeerAddressChangeType(); |
| 661 |
| 659 // Selects and updates the version of the protocol being used by selecting a | 662 // Selects and updates the version of the protocol being used by selecting a |
| 660 // version from |available_versions| which is also supported. Returns true if | 663 // version from |available_versions| which is also supported. Returns true if |
| 661 // such a version exists, false otherwise. | 664 // such a version exists, false otherwise. |
| 662 bool SelectMutualVersion(const QuicVersionVector& available_versions); | 665 bool SelectMutualVersion(const QuicVersionVector& available_versions); |
| 663 | 666 |
| 664 bool peer_ip_changed() const { return peer_ip_changed_; } | 667 bool peer_ip_changed() const { return peer_ip_changed_; } |
| 665 | 668 |
| 666 bool peer_port_changed() const { return peer_port_changed_; } | 669 bool peer_port_changed() const { return peer_port_changed_; } |
| 667 | 670 |
| 671 const IPAddressNumber& migrating_peer_ip() const { return migrating_peer_ip_;
} |
| 672 |
| 668 private: | 673 private: |
| 669 friend class test::QuicConnectionPeer; | 674 friend class test::QuicConnectionPeer; |
| 670 friend class test::PacketSavingConnection; | 675 friend class test::PacketSavingConnection; |
| 671 | 676 |
| 672 typedef std::list<QueuedPacket> QueuedPacketList; | 677 typedef std::list<QueuedPacket> QueuedPacketList; |
| 673 typedef std::map<QuicFecGroupNumber, QuicFecGroup*> FecGroupMap; | 678 typedef std::map<QuicFecGroupNumber, QuicFecGroup*> FecGroupMap; |
| 674 | 679 |
| 675 // Writes the given packet to socket, encrypted with packet's | 680 // Writes the given packet to socket, encrypted with packet's |
| 676 // encryption_level. Returns true on successful write, and false if the writer | 681 // encryption_level. Returns true on successful write, and false if the writer |
| 677 // was blocked and the write needs to be tried again. Notifies the | 682 // was blocked and the write needs to be tried again. Notifies the |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 | 976 |
| 972 // Whether a GoAway has been received. | 977 // Whether a GoAway has been received. |
| 973 bool goaway_received_; | 978 bool goaway_received_; |
| 974 | 979 |
| 975 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 980 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 976 }; | 981 }; |
| 977 | 982 |
| 978 } // namespace net | 983 } // namespace net |
| 979 | 984 |
| 980 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 985 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |