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

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

Issue 2340583002: Make DiversificationNonce a std::array (Closed)
Patch Set: Created 4 years, 3 months 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 | « net/quic/core/quic_packet_creator.cc ('k') | net/quic/core/quic_packet_generator.cc » ('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 // Responsible for generating packets on behalf of a QuicConnection. 5 // Responsible for generating packets on behalf of a QuicConnection.
6 // Packets are serialized just-in-time. Control frames are queued. 6 // Packets are serialized just-in-time. Control frames are queued.
7 // Ack and Feedback frames will be requested from the Connection 7 // Ack and Feedback frames will be requested from the Connection
8 // just-in-time. When a packet needs to be sent, the Generator 8 // just-in-time. When a packet needs to be sent, the Generator
9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket() 9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket()
10 // 10 //
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 // Whether the pending packet has no frames in it at the moment. 126 // Whether the pending packet has no frames in it at the moment.
127 bool IsPendingPacketEmpty() const; 127 bool IsPendingPacketEmpty() const;
128 128
129 // Makes the framer not serialize the protocol version in sent packets. 129 // Makes the framer not serialize the protocol version in sent packets.
130 void StopSendingVersion(); 130 void StopSendingVersion();
131 131
132 // SetDiversificationNonce sets the nonce that will be sent in each public 132 // SetDiversificationNonce sets the nonce that will be sent in each public
133 // header of packets encrypted at the initial encryption level. Should only 133 // header of packets encrypted at the initial encryption level. Should only
134 // be called by servers. 134 // be called by servers.
135 void SetDiversificationNonce(const DiversificationNonce nonce); 135 void SetDiversificationNonce(const DiversificationNonce& nonce);
136 136
137 // Creates a version negotiation packet which supports |supported_versions|. 137 // Creates a version negotiation packet which supports |supported_versions|.
138 // Caller owns the created packet. Also, sets the entropy hash of the 138 // Caller owns the created packet. Also, sets the entropy hash of the
139 // serialized packet to a random bool and returns that value as a member of 139 // serialized packet to a random bool and returns that value as a member of
140 // SerializedPacket. 140 // SerializedPacket.
141 QuicEncryptedPacket* SerializeVersionNegotiationPacket( 141 QuicEncryptedPacket* SerializeVersionNegotiationPacket(
142 const QuicVersionVector& supported_versions); 142 const QuicVersionVector& supported_versions);
143 143
144 // Re-serializes frames with the original packet's packet number length. 144 // Re-serializes frames with the original packet's packet number length.
145 // Used for retransmitting packets to ensure they aren't too long. 145 // Used for retransmitting packets to ensure they aren't too long.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // retransmitted. 216 // retransmitted.
217 QuicAckFrame pending_ack_frame_; 217 QuicAckFrame pending_ack_frame_;
218 QuicStopWaitingFrame pending_stop_waiting_frame_; 218 QuicStopWaitingFrame pending_stop_waiting_frame_;
219 219
220 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 220 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
221 }; 221 };
222 222
223 } // namespace net 223 } // namespace net
224 224
225 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 225 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_packet_creator.cc ('k') | net/quic/core/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698