| OLD | NEW |
| 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 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // Returns a fate which describes what subsequent processing should be | 276 // Returns a fate which describes what subsequent processing should be |
| 277 // performed on the packets, like ValidityChecks. | 277 // performed on the packets, like ValidityChecks. |
| 278 QuicPacketFate MaybeRejectStatelessly(QuicConnectionId connection_id, | 278 QuicPacketFate MaybeRejectStatelessly(QuicConnectionId connection_id, |
| 279 const QuicPacketHeader& header); | 279 const QuicPacketHeader& header); |
| 280 | 280 |
| 281 // Deliver |packets| to |session| for further processing. | 281 // Deliver |packets| to |session| for further processing. |
| 282 void DeliverPacketsToSession( | 282 void DeliverPacketsToSession( |
| 283 const std::list<QuicBufferedPacketStore::BufferedPacket>& packets, | 283 const std::list<QuicBufferedPacketStore::BufferedPacket>& packets, |
| 284 QuicServerSessionBase* session); | 284 QuicServerSessionBase* session); |
| 285 | 285 |
| 286 // Perform the appropriate actions on the current packet based on |fate| - |
| 287 // either process, buffer, or drop it. |
| 288 void ProcessUnauthenticatedHeaderFate(QuicPacketFate fate, |
| 289 QuicConnectionId connection_id, |
| 290 QuicPacketNumber packet_number); |
| 291 |
| 286 void set_new_sessions_allowed_per_event_loop( | 292 void set_new_sessions_allowed_per_event_loop( |
| 287 int16_t new_sessions_allowed_per_event_loop) { | 293 int16_t new_sessions_allowed_per_event_loop) { |
| 288 new_sessions_allowed_per_event_loop_ = new_sessions_allowed_per_event_loop; | 294 new_sessions_allowed_per_event_loop_ = new_sessions_allowed_per_event_loop; |
| 289 } | 295 } |
| 290 | 296 |
| 291 const QuicConfig& config_; | 297 const QuicConfig& config_; |
| 292 | 298 |
| 293 const QuicCryptoServerConfig* crypto_config_; | 299 const QuicCryptoServerConfig* crypto_config_; |
| 294 | 300 |
| 295 // The cache for most recently compressed certs. | 301 // The cache for most recently compressed certs. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // A backward counter of how many new sessions can be create within current | 349 // A backward counter of how many new sessions can be create within current |
| 344 // event loop. When reaches 0, it means can't create sessions for now. | 350 // event loop. When reaches 0, it means can't create sessions for now. |
| 345 int16_t new_sessions_allowed_per_event_loop_; | 351 int16_t new_sessions_allowed_per_event_loop_; |
| 346 | 352 |
| 347 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 353 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 348 }; | 354 }; |
| 349 | 355 |
| 350 } // namespace net | 356 } // namespace net |
| 351 | 357 |
| 352 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 358 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |