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

Side by Side Diff: net/tools/quic/quic_dispatcher.h

Issue 1783783003: Add a QuicCompressedCertsCache instance to QuicDispatcher, plumbing to QuicServerSessionBase but no… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116273065
Patch Set: Created 4 years, 9 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/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_dispatcher.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 // A server side dispatcher which dispatches a given client's data to their 5 // A server side dispatcher which dispatches a given client's data to their
6 // stream. 6 // stream.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_DISPATCHER_H_
9 #define NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ 9 #define NET_TOOLS_QUIC_QUIC_DISPATCHER_H_
10 10
11 #include <unordered_map> 11 #include <unordered_map>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "net/base/ip_endpoint.h" 17 #include "net/base/ip_endpoint.h"
18 #include "net/base/linked_hash_map.h" 18 #include "net/base/linked_hash_map.h"
19 #include "net/quic/crypto/quic_compressed_certs_cache.h"
19 #include "net/quic/quic_blocked_writer_interface.h" 20 #include "net/quic/quic_blocked_writer_interface.h"
20 #include "net/quic/quic_connection.h" 21 #include "net/quic/quic_connection.h"
21 #include "net/quic/quic_protocol.h" 22 #include "net/quic/quic_protocol.h"
22 #include "net/tools/quic/quic_process_packet_interface.h" 23 #include "net/tools/quic/quic_process_packet_interface.h"
23 #include "net/tools/quic/quic_server_session_base.h" 24 #include "net/tools/quic/quic_server_session_base.h"
24 #include "net/tools/quic/quic_time_wait_list_manager.h" 25 #include "net/tools/quic/quic_time_wait_list_manager.h"
25 26
26 namespace net { 27 namespace net {
27 28
28 class QuicConfig; 29 class QuicConfig;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 181 }
181 182
182 const IPEndPoint& current_server_address() { return current_server_address_; } 183 const IPEndPoint& current_server_address() { return current_server_address_; }
183 const IPEndPoint& current_client_address() { return current_client_address_; } 184 const IPEndPoint& current_client_address() { return current_client_address_; }
184 const QuicEncryptedPacket& current_packet() { return *current_packet_; } 185 const QuicEncryptedPacket& current_packet() { return *current_packet_; }
185 186
186 const QuicConfig& config() const { return config_; } 187 const QuicConfig& config() const { return config_; }
187 188
188 const QuicCryptoServerConfig* crypto_config() const { return crypto_config_; } 189 const QuicCryptoServerConfig* crypto_config() const { return crypto_config_; }
189 190
191 QuicCompressedCertsCache* compressed_certs_cache() {
192 return &compressed_certs_cache_;
193 }
194
190 QuicFramer* framer() { return &framer_; } 195 QuicFramer* framer() { return &framer_; }
191 196
192 QuicConnectionHelperInterface* helper() { return helper_.get(); } 197 QuicConnectionHelperInterface* helper() { return helper_.get(); }
193 198
194 QuicPacketWriter* writer() { return writer_.get(); } 199 QuicPacketWriter* writer() { return writer_.get(); }
195 200
196 // Creates per-connection packet writers out of the QuicDispatcher's shared 201 // Creates per-connection packet writers out of the QuicDispatcher's shared
197 // QuicPacketWriter. The per-connection writers' IsWriteBlocked() state must 202 // QuicPacketWriter. The per-connection writers' IsWriteBlocked() state must
198 // always be the same as the shared writer's IsWriteBlocked(), or else the 203 // always be the same as the shared writer's IsWriteBlocked(), or else the
199 // QuicDispatcher::OnCanWrite logic will not work. (This will hopefully be 204 // QuicDispatcher::OnCanWrite logic will not work. (This will hopefully be
(...skipping 13 matching lines...) Expand all
213 // the ConnectionId to the time-wait list. If |session_closed_statelessly| is 218 // the ConnectionId to the time-wait list. If |session_closed_statelessly| is
214 // true, any future packets for the ConnectionId will be black-holed. 219 // true, any future packets for the ConnectionId will be black-holed.
215 void CleanUpSession(SessionMap::iterator it, bool session_closed_statelessly); 220 void CleanUpSession(SessionMap::iterator it, bool session_closed_statelessly);
216 221
217 bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header); 222 bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header);
218 223
219 const QuicConfig& config_; 224 const QuicConfig& config_;
220 225
221 const QuicCryptoServerConfig* crypto_config_; 226 const QuicCryptoServerConfig* crypto_config_;
222 227
228 // The cache for most recently compressed certs.
229 QuicCompressedCertsCache compressed_certs_cache_;
230
223 // The list of connections waiting to write. 231 // The list of connections waiting to write.
224 WriteBlockedList write_blocked_list_; 232 WriteBlockedList write_blocked_list_;
225 233
226 SessionMap session_map_; 234 SessionMap session_map_;
227 235
228 // Entity that manages connection_ids in time wait state. 236 // Entity that manages connection_ids in time wait state.
229 scoped_ptr<QuicTimeWaitListManager> time_wait_list_manager_; 237 scoped_ptr<QuicTimeWaitListManager> time_wait_list_manager_;
230 238
231 // The list of closed but not-yet-deleted sessions. 239 // The list of closed but not-yet-deleted sessions.
232 std::vector<QuicServerSessionBase*> closed_session_list_; 240 std::vector<QuicServerSessionBase*> closed_session_list_;
(...skipping 24 matching lines...) Expand all
257 // The last error set by SetLastError(), which is called by 265 // The last error set by SetLastError(), which is called by
258 // framer_visitor_->OnError(). 266 // framer_visitor_->OnError().
259 QuicErrorCode last_error_; 267 QuicErrorCode last_error_;
260 268
261 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); 269 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher);
262 }; 270 };
263 271
264 } // namespace net 272 } // namespace net
265 273
266 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ 274 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698