| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // This method is called by OnUnauthenticatedHeader on packets not associated | 190 // This method is called by OnUnauthenticatedHeader on packets not associated |
| 191 // with a known connection ID. It applies validity checks and returns a | 191 // with a known connection ID. It applies validity checks and returns a |
| 192 // QuicPacketFate to tell what should be done with the packet. | 192 // QuicPacketFate to tell what should be done with the packet. |
| 193 virtual QuicPacketFate ValidityChecks(const QuicPacketHeader& header); | 193 virtual QuicPacketFate ValidityChecks(const QuicPacketHeader& header); |
| 194 | 194 |
| 195 // Create and return the time wait list manager for this dispatcher, which | 195 // Create and return the time wait list manager for this dispatcher, which |
| 196 // will be owned by the dispatcher as time_wait_list_manager_ | 196 // will be owned by the dispatcher as time_wait_list_manager_ |
| 197 virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager(); | 197 virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager(); |
| 198 | 198 |
| 199 // Called when |current_packet_| is a data packet that has arrived before | 199 // Called when |current_packet_| is a data packet that has arrived before |
| 200 // the CHLO. Buffers the current packet until the CHLO arrives. | 200 // the CHLO or it is any kind of packet while a CHLO on same connection has |
| 201 // already been in the buffer. |
| 201 void BufferEarlyPacket(QuicConnectionId connection_id); | 202 void BufferEarlyPacket(QuicConnectionId connection_id); |
| 202 | 203 |
| 203 // Called when |current_packet_| is a CHLO packet. Creates a new connection | 204 // Called when |current_packet_| is a CHLO packet. Creates a new connection |
| 204 // and delivers any buffered packets for that connection id. | 205 // and delivers any buffered packets for that connection id. |
| 205 void ProcessChlo(); | 206 void ProcessChlo(); |
| 206 | 207 |
| 207 QuicTimeWaitListManager* time_wait_list_manager() { | 208 QuicTimeWaitListManager* time_wait_list_manager() { |
| 208 return time_wait_list_manager_.get(); | 209 return time_wait_list_manager_.get(); |
| 209 } | 210 } |
| 210 | 211 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // A backward counter of how many new sessions can be create within current | 362 // A backward counter of how many new sessions can be create within current |
| 362 // event loop. When reaches 0, it means can't create sessions for now. | 363 // event loop. When reaches 0, it means can't create sessions for now. |
| 363 int16_t new_sessions_allowed_per_event_loop_; | 364 int16_t new_sessions_allowed_per_event_loop_; |
| 364 | 365 |
| 365 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 366 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 366 }; | 367 }; |
| 367 | 368 |
| 368 } // namespace net | 369 } // namespace net |
| 369 | 370 |
| 370 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 371 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |