Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: net/quic/core/quic_connection.h

Issue 2512793002: Move QuicVersionNegotiationState into QuicConnection, the only place it is used. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_protocol.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 // packet number of the last sent packet. Packets are guaranteed to be sent 1035 // packet number of the last sent packet. Packets are guaranteed to be sent
1036 // in packet number order. 1036 // in packet number order.
1037 QuicPacketNumber packet_number_of_last_sent_packet_; 1037 QuicPacketNumber packet_number_of_last_sent_packet_;
1038 1038
1039 // Sent packet manager which tracks the status of packets sent by this 1039 // Sent packet manager which tracks the status of packets sent by this
1040 // connection and contains the send and receive algorithms to determine when 1040 // connection and contains the send and receive algorithms to determine when
1041 // to send packets. 1041 // to send packets.
1042 std::unique_ptr<QuicSentPacketManagerInterface> sent_packet_manager_; 1042 std::unique_ptr<QuicSentPacketManagerInterface> sent_packet_manager_;
1043 1043
1044 // The state of connection in version negotiation finite state machine. 1044 // The state of connection in version negotiation finite state machine.
1045 enum QuicVersionNegotiationState {
1046 START_NEGOTIATION = 0,
1047 // Server-side this implies we've sent a version negotiation packet and are
1048 // waiting on the client to select a compatible version. Client-side this
1049 // implies we've gotten a version negotiation packet, are retransmitting the
1050 // initial packets with a supported version and are waiting for our first
1051 // packet from the server.
1052 NEGOTIATION_IN_PROGRESS,
1053 // This indicates this endpoint has received a packet from the peer with a
1054 // version this endpoint supports. Version negotiation is complete, and the
1055 // version number will no longer be sent with future packets.
1056 NEGOTIATED_VERSION
1057 };
1045 QuicVersionNegotiationState version_negotiation_state_; 1058 QuicVersionNegotiationState version_negotiation_state_;
1046 1059
1047 // Tracks if the connection was created by the server or the client. 1060 // Tracks if the connection was created by the server or the client.
1048 Perspective perspective_; 1061 Perspective perspective_;
1049 1062
1050 // True by default. False if we've received or sent an explicit connection 1063 // True by default. False if we've received or sent an explicit connection
1051 // close. 1064 // close.
1052 bool connected_; 1065 bool connected_;
1053 1066
1054 // Destination address of the last received packet. 1067 // Destination address of the last received packet.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 // Indicates whether a write error is encountered currently. This is used to 1113 // Indicates whether a write error is encountered currently. This is used to
1101 // avoid infinite write errors. 1114 // avoid infinite write errors.
1102 bool write_error_occured_; 1115 bool write_error_occured_;
1103 1116
1104 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 1117 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
1105 }; 1118 };
1106 1119
1107 } // namespace net 1120 } // namespace net
1108 1121
1109 #endif // NET_QUIC_QUIC_CONNECTION_H_ 1122 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698