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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 299 | 299 |
| 300 // Called when a packet has been finally sent to the network. | 300 // Called when a packet has been finally sent to the network. |
| 301 bool OnPacketSent(WriteResult result); | 301 bool OnPacketSent(WriteResult result); |
| 302 | 302 |
| 303 // If the socket is not blocked, writes queued packets. | 303 // If the socket is not blocked, writes queued packets. |
| 304 void WriteIfNotBlocked(); | 304 void WriteIfNotBlocked(); |
| 305 | 305 |
| 306 // Do any work which logically would be done in OnPacket but can not be | 306 // Do any work which logically would be done in OnPacket but can not be |
| 307 // safely done until the packet is validated. Returns true if the packet | 307 // safely done until the packet is validated. Returns true if the packet |
| 308 // can be handled, false otherwise. | 308 // can be handled, false otherwise. |
| 309 virtual bool ProcessValidatedPacket(); | 309 bool ProcessValidatedPacket(); |
|
wtc
2014/07/16 20:42:46
IMPORTANT: please undo this change. I found that a
ramant (doing other things)
2014/07/16 22:31:40
Undid the change. Saw you have submitted a CL to m
| |
| 310 | 310 |
| 311 // The version of the protocol this connection is using. | 311 // The version of the protocol this connection is using. |
| 312 QuicVersion version() const { return framer_.version(); } | 312 QuicVersion version() const { return framer_.version(); } |
| 313 | 313 |
| 314 // The versions of the protocol that this connection supports. | 314 // The versions of the protocol that this connection supports. |
| 315 const QuicVersionVector& supported_versions() const { | 315 const QuicVersionVector& supported_versions() const { |
| 316 return framer_.supported_versions(); | 316 return framer_.supported_versions(); |
| 317 } | 317 } |
| 318 | 318 |
| 319 // From QuicFramerVisitorInterface | 319 // From QuicFramerVisitorInterface |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 | 507 |
| 508 // Selects and updates the version of the protocol being used by selecting a | 508 // Selects and updates the version of the protocol being used by selecting a |
| 509 // version from |available_versions| which is also supported. Returns true if | 509 // version from |available_versions| which is also supported. Returns true if |
| 510 // such a version exists, false otherwise. | 510 // such a version exists, false otherwise. |
| 511 bool SelectMutualVersion(const QuicVersionVector& available_versions); | 511 bool SelectMutualVersion(const QuicVersionVector& available_versions); |
| 512 | 512 |
| 513 QuicPacketWriter* writer() { return writer_; } | 513 QuicPacketWriter* writer() { return writer_; } |
| 514 | 514 |
| 515 bool peer_port_changed() const { return peer_port_changed_; } | 515 bool peer_port_changed() const { return peer_port_changed_; } |
| 516 | 516 |
| 517 const QuicReceivedPacketManager& received_packet_manager() { | 517 const QuicReceivedPacketManager& received_packet_manager() const { |
| 518 return received_packet_manager_; | 518 return received_packet_manager_; |
| 519 } | 519 } |
| 520 | 520 |
| 521 QuicPacketSequenceNumber sequence_number_of_last_sent_packet() const { | 521 QuicPacketSequenceNumber sequence_number_of_last_sent_packet() const { |
| 522 return sequence_number_of_last_sent_packet_; | 522 return sequence_number_of_last_sent_packet_; |
| 523 } | 523 } |
| 524 | 524 |
| 525 private: | 525 private: |
| 526 friend class test::QuicConnectionPeer; | 526 friend class test::QuicConnectionPeer; |
| 527 | 527 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 773 // If non-empty this contains the set of versions received in a | 773 // If non-empty this contains the set of versions received in a |
| 774 // version negotiation packet. | 774 // version negotiation packet. |
| 775 QuicVersionVector server_supported_versions_; | 775 QuicVersionVector server_supported_versions_; |
| 776 | 776 |
| 777 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 777 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 778 }; | 778 }; |
| 779 | 779 |
| 780 } // namespace net | 780 } // namespace net |
| 781 | 781 |
| 782 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 782 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |