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

Unified Diff: net/tools/quic/quic_dispatcher.h

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_client_test.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.h
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h
index 8c1cfca7f58dbdd314168c3ed5b64a3ca4a33c59..583c685f1b1062fd717a2b1bdd73fc478795a636 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -141,7 +141,7 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
bool OnPathCloseFrame(const QuicPathCloseFrame& frame) override;
void OnPacketComplete() override;
- // QuicBufferedPacketStore::VisitorInterface
+ // QuicBufferedPacketStore::VisitorInterface implementation.
void OnExpiredPackets(QuicConnectionId connection_id,
QuicBufferedPacketStore::BufferedPacketList
early_arrived_packets) override;
@@ -170,6 +170,8 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
kFateProcess,
// Put the connection ID into time-wait state and send a public reset.
kFateTimeWait,
+ // Buffer the packet.
+ kFateBuffer,
// Drop the packet (ignore and give no response).
kFateDrop,
};
@@ -183,6 +185,14 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
// will be owned by the dispatcher as time_wait_list_manager_
virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager();
+ // Called when |current_packet_| is a data packet that has arrived before
+ // the CHLO. Buffers the current packet until the CHLO arrives.
+ void BufferEarlyPacket(QuicConnectionId connection_id);
+
+ // Called when |current_packet_| is a CHLO packet. Creates a new connection
+ // and delivers any buffered packets for that connection id.
+ void ProcessChlo();
+
QuicTimeWaitListManager* time_wait_list_manager() {
return time_wait_list_manager_.get();
}
@@ -233,6 +243,18 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
virtual bool OnUnauthenticatedUnknownPublicHeader(
const QuicPacketPublicHeader& header);
+ // Called when a new connection starts to be handled by this dispatcher.
+ // Either this connection is created or its packets is buffered while waiting
+ // for CHLO.
+ virtual void OnNewConnectionAdded(QuicConnectionId connection_id);
+
+ bool HasBufferedPackets(QuicConnectionId connection_id);
+
+ // Called when BufferEarlyPacket() fail to buffer the packet.
+ virtual void OnBufferPacketFailure(
+ QuicBufferedPacketStore::EnqueuePacketResult result,
+ QuicConnectionId connection_id);
+
private:
friend class net::test::QuicDispatcherPeer;
@@ -283,8 +305,8 @@ class QuicDispatcher : public QuicServerSessionBase::Visitor,
// The writer to write to the socket with.
std::unique_ptr<QuicPacketWriter> writer_;
- // Undecryptable packets which are buffered until a connection can be
- // created to handle them.
+ // Packets which are buffered until a connection can be created to handle
+ // them.
QuicBufferedPacketStore buffered_packets_;
// Information about the packet currently being handled.
« no previous file with comments | « net/tools/quic/quic_client_test.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698