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

Unified Diff: net/quic/quic_connection.h

Issue 1424653008: Make QUIC stateless rejects work in the face of packet loss by storing the SREJ packet(s) in the Qu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106432163
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/quic_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.h
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 8399747e878f5afa4515b3e8daee304faab8f3b0..288de9ad9e5f90d0a00efb2e3b2b52dff46351f0 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -479,9 +479,9 @@ class NET_EXPORT_PRIVATE QuicConnection
// Testing only.
size_t NumQueuedPackets() const { return queued_packets_.size(); }
- QuicEncryptedPacket* ReleaseConnectionClosePacket() {
- return connection_close_packet_.release();
- }
+ // Once called, any sent crypto packets to be saved as the
+ // termination packet, for use with stateless rejections.
+ void EnableSavingCryptoPackets();
// Returns true if the underlying UDP socket is writable, there is
// no queued data and the connection is not congestion-control
@@ -622,6 +622,10 @@ class NET_EXPORT_PRIVATE QuicConnection
// Return the id of the cipher of the primary decrypter of the framer.
uint32 cipher_id() const { return framer_.decrypter()->cipher_id(); }
+ std::vector<QuicEncryptedPacket*>* termination_packets() {
+ return termination_packets_.get();
+ }
+
protected:
// Packets which have not been written to the wire.
// Owns the QuicPacket* packet.
@@ -765,7 +769,7 @@ class NET_EXPORT_PRIVATE QuicConnection
const IPEndPoint& peer_address);
HasRetransmittableData IsRetransmittable(const QueuedPacket& packet);
- bool IsConnectionClose(const QueuedPacket& packet);
+ bool IsTerminationPacket(const QueuedPacket& packet);
// Set the size of the packet we are targeting while doing path MTU discovery.
void SetMtuDiscoveryTarget(QuicByteCount target);
@@ -835,8 +839,11 @@ class NET_EXPORT_PRIVATE QuicConnection
// unacked_packets_ if they are to be retransmitted.
QueuedPacketList queued_packets_;
- // Contains the connection close packet if the connection has been closed.
- scoped_ptr<QuicEncryptedPacket> connection_close_packet_;
+ // If true, then crypto packets will be saved as termination packets.
+ bool save_crypto_packets_as_termination_packets_;
+
+ // Contains the connection close packets if the connection has been closed.
+ scoped_ptr<std::vector<QuicEncryptedPacket*>> termination_packets_;
// When true, the connection does not send a close packet on timeout.
bool silent_close_enabled_;
« no previous file with comments | « no previous file | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698