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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 const QuicReceivedPacketManager& received_packet_manager() const { | 690 const QuicReceivedPacketManager& received_packet_manager() const { |
691 return received_packet_manager_; | 691 return received_packet_manager_; |
692 } | 692 } |
693 | 693 |
694 EncryptionLevel encryption_level() const { return encryption_level_; } | 694 EncryptionLevel encryption_level() const { return encryption_level_; } |
695 | 695 |
696 const IPEndPoint& last_packet_source_address() const { | 696 const IPEndPoint& last_packet_source_address() const { |
697 return last_packet_source_address_; | 697 return last_packet_source_address_; |
698 } | 698 } |
699 | 699 |
700 void set_largest_packet_size_supported(QuicByteCount size) { | |
701 largest_packet_size_supported_ = size; | |
702 } | |
703 | |
704 protected: | 700 protected: |
705 // Calls cancel() on all the alarms owned by this connection. | 701 // Calls cancel() on all the alarms owned by this connection. |
706 void CancelAllAlarms(); | 702 void CancelAllAlarms(); |
707 | 703 |
708 // Send a packet to the peer, and takes ownership of the packet if the packet | 704 // Send a packet to the peer, and takes ownership of the packet if the packet |
709 // cannot be written immediately. | 705 // cannot be written immediately. |
710 virtual void SendOrQueuePacket(SerializedPacket* packet); | 706 virtual void SendOrQueuePacket(SerializedPacket* packet); |
711 | 707 |
712 // Called after a packet is received from a new peer address on existing | 708 // Called after a packet is received from a new peer address on existing |
713 // |path_id| and is decrypted. Starts validation of peer's address change. | 709 // |path_id| and is decrypted. Starts validation of peer's address change. |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 // The value of the MTU regularly used by the connection. This is different | 1086 // The value of the MTU regularly used by the connection. This is different |
1091 // from the value returned by max_packet_size(), as max_packet_size() returns | 1087 // from the value returned by max_packet_size(), as max_packet_size() returns |
1092 // the value of the MTU as currently used by the serializer, so if | 1088 // the value of the MTU as currently used by the serializer, so if |
1093 // serialization of an MTU probe is in progress, those two values will be | 1089 // serialization of an MTU probe is in progress, those two values will be |
1094 // different. | 1090 // different. |
1095 QuicByteCount long_term_mtu_; | 1091 QuicByteCount long_term_mtu_; |
1096 | 1092 |
1097 // The size of the largest packet received from peer. | 1093 // The size of the largest packet received from peer. |
1098 QuicByteCount largest_received_packet_size_; | 1094 QuicByteCount largest_received_packet_size_; |
1099 | 1095 |
1100 // The maximum allowed packet size. | |
1101 QuicByteCount largest_packet_size_supported_; | |
1102 | |
1103 // Whether a GoAway has been sent. | 1096 // Whether a GoAway has been sent. |
1104 bool goaway_sent_; | 1097 bool goaway_sent_; |
1105 | 1098 |
1106 // Whether a GoAway has been received. | 1099 // Whether a GoAway has been received. |
1107 bool goaway_received_; | 1100 bool goaway_received_; |
1108 | 1101 |
1109 // If true, multipath is enabled for this connection. | 1102 // If true, multipath is enabled for this connection. |
1110 bool multipath_enabled_; | 1103 bool multipath_enabled_; |
1111 | 1104 |
1112 // Indicates whether a write error is encountered currently. This is used to | 1105 // Indicates whether a write error is encountered currently. This is used to |
1113 // avoid infinite write errors. | 1106 // avoid infinite write errors. |
1114 bool write_error_occured_; | 1107 bool write_error_occured_; |
1115 | 1108 |
1116 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1109 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
1117 }; | 1110 }; |
1118 | 1111 |
1119 } // namespace net | 1112 } // namespace net |
1120 | 1113 |
1121 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 1114 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |