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

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

Issue 2808273006: Landing Recent QUIC changes until Sun Apr 9 16:12:55 (Closed)
Patch Set: increment enabled_options in e2e test Created 3 years, 8 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_session_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 50d754fcb68639d1e8b584c4ac7cee9974002b9a..3dff824793ee964c57dbbe90297e16ecdc509ab8 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -199,7 +199,7 @@ class QuicDispatcher : public QuicTimeWaitListManager::Visitor,
// Called when |current_packet_| is a CHLO packet. Creates a new connection
// and delivers any buffered packets for that connection id.
- void ProcessChlo();
+ void ProcessChlo(QuicPacketNumber packet_number);
QuicTimeWaitListManager* time_wait_list_manager() {
return time_wait_list_manager_.get();
@@ -269,19 +269,21 @@ class QuicDispatcher : public QuicTimeWaitListManager::Visitor,
QuicBufferedPacketStore::EnqueuePacketResult result,
QuicConnectionId connection_id);
+ // Removes the session from the session map and write blocked list, and adds
+ // the ConnectionId to the time-wait list. If |session_closed_statelessly| is
+ // true, any future packets for the ConnectionId will be black-holed.
+ virtual void CleanUpSession(SessionMap::iterator it,
+ QuicConnection* connection,
+ bool session_closed_statelessly);
+
+ void StopAcceptingNewConnections();
+
private:
friend class test::QuicDispatcherPeer;
friend class StatelessRejectorProcessDoneCallback;
typedef std::unordered_set<QuicConnectionId> QuicConnectionIdSet;
- // Removes the session from the session map and write blocked list, and adds
- // the ConnectionId to the time-wait list. If |session_closed_statelessly| is
- // true, any future packets for the ConnectionId will be black-holed.
- void CleanUpSession(SessionMap::iterator it,
- QuicConnection* connection,
- bool session_closed_statelessly);
-
bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header);
// Attempts to reject the connection statelessly, if stateless rejects are
@@ -384,6 +386,9 @@ class QuicDispatcher : public QuicTimeWaitListManager::Visitor,
// event loop. When reaches 0, it means can't create sessions for now.
int16_t new_sessions_allowed_per_event_loop_;
+ // True if this dispatcher is not draining.
+ bool accept_new_connections_;
+
DISALLOW_COPY_AND_ASSIGN(QuicDispatcher);
};
« no previous file with comments | « net/tools/quic/quic_client_session_test.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698