QuicFramer* framer,
QuicRandom* random_generator);
- virtual ~QuicPacketCreator();
+ ~QuicPacketCreator() override;
// QuicFecBuilderInterface
- virtual void OnBuiltFecProtectedPayload(const QuicPacketHeader& header,
- base::StringPiece payload) OVERRIDE;
+ void OnBuiltFecProtectedPayload(const QuicPacketHeader& header,
+ base::StringPiece payload) override;
// Turn on FEC protection for subsequently created packets. FEC should be
// enabled first (max_packets_per_fec_group should be non-zero) for FEC
// can be safely changed.
void UpdateSequenceNumberLength(
QuicPacketSequenceNumber least_packet_awaited_by_peer,
- QuicByteCount congestion_window);
+ QuicPacketCount max_packets_in_flight);
// The overhead the framing will add for a packet with one frame.
static size_t StreamFramePacketOverhead(
// Returns true if subsequent packets will be FEC protected. Note: True does
// not mean that an FEC packet is currently under construction; i.e.,
- // fec_group_.get() may still be NULL, until MaybeStartFec() is called.
+ // fec_group_.get() may still be nullptr, until MaybeStartFec() is called.
bool IsFecProtected() const;
// Returns the number of bytes which are available to be used by additional
bool AddSavedFrame(const QuicFrame& frame);
// Serializes all frames which have been added and adds any which should be
- // retransmitted to |retransmittable_frames| if it's not NULL. All frames must
- // fit into a single packet. Sets the entropy hash of the serialized
+ // retransmitted to |retransmittable_frames| if it's not nullptr. All frames
+ // must fit into a single packet. Sets the entropy hash of the serialized
// packet to a random bool and returns that value as a member of
- // SerializedPacket. Also, sets |serialized_frames| in the SerializedPacket
- // to the corresponding RetransmittableFrames if any frames are to be
+ // SerializedPacket. Also, sets |serialized_frames| in the SerializedPacket to
+ // the corresponding RetransmittableFrames if any frames are to be
// retransmitted.
SerializedPacket SerializePacket();
return connection_id_length_;
}
+ void set_connection_id_length(QuicConnectionIdLength length) {
+ connection_id_length_ = length;
+ }
+
QuicSequenceNumberLength next_sequence_number_length() const {
return next_sequence_number_length_;
}
void set_max_packet_length(size_t length) {
// |max_packet_length_| should not be changed mid-packet or mid-FEC group.
- DCHECK(fec_group_.get() == NULL && queued_frames_.empty());
+ DCHECK(fec_group_.get() == nullptr && queued_frames_.empty());
max_packet_length_ = length;
}