| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Deletes all sessions on the closed session list and clears the list. | 126 // Deletes all sessions on the closed session list and clears the list. |
| 127 void DeleteSessions(); | 127 void DeleteSessions(); |
| 128 | 128 |
| 129 // The largest packet number we expect to receive with a connection | 129 // The largest packet number we expect to receive with a connection |
| 130 // ID for a connection that is not established yet. The current design will | 130 // ID for a connection that is not established yet. The current design will |
| 131 // send a handshake and then up to 50 or so data packets, and then it may | 131 // send a handshake and then up to 50 or so data packets, and then it may |
| 132 // resend the handshake packet up to 10 times. (Retransmitted packets are | 132 // resend the handshake packet up to 10 times. (Retransmitted packets are |
| 133 // sent with unique packet numbers.) | 133 // sent with unique packet numbers.) |
| 134 static const QuicPacketNumber kMaxReasonableInitialPacketNumber = 100; | 134 static const QuicPacketNumber kMaxReasonableInitialPacketNumber = 100; |
| 135 static_assert(kMaxReasonableInitialPacketNumber >= | 135 static_assert(kMaxReasonableInitialPacketNumber >= |
| 136 kInitialCongestionWindowSecure + 10, | 136 kInitialCongestionWindow + 10, |
| 137 "kMaxReasonableInitialPacketNumber is unreasonably small " | 137 "kMaxReasonableInitialPacketNumber is unreasonably small " |
| 138 "relative to kInitialCongestionWindowSecure."); | 138 "relative to kInitialCongestionWindow."); |
| 139 static_assert(kMaxReasonableInitialPacketNumber >= | |
| 140 kInitialCongestionWindowInsecure + 10, | |
| 141 "kMaxReasonableInitialPacketNumber is unreasonably small " | |
| 142 "relative to kInitialCongestionWindowInsecure."); | |
| 143 | 139 |
| 144 protected: | 140 protected: |
| 145 virtual QuicServerSession* CreateQuicSession( | 141 virtual QuicServerSession* CreateQuicSession( |
| 146 QuicConnectionId connection_id, | 142 QuicConnectionId connection_id, |
| 147 const IPEndPoint& client_address); | 143 const IPEndPoint& client_address); |
| 148 | 144 |
| 149 // Called by |framer_visitor_| when the public header has been parsed. | 145 // Called by |framer_visitor_| when the public header has been parsed. |
| 150 virtual bool OnUnauthenticatedPublicHeader( | 146 virtual bool OnUnauthenticatedPublicHeader( |
| 151 const QuicPacketPublicHeader& header); | 147 const QuicPacketPublicHeader& header); |
| 152 | 148 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // framer_visitor_->OnError(). | 284 // framer_visitor_->OnError(). |
| 289 QuicErrorCode last_error_; | 285 QuicErrorCode last_error_; |
| 290 | 286 |
| 291 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 287 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 292 }; | 288 }; |
| 293 | 289 |
| 294 } // namespace tools | 290 } // namespace tools |
| 295 } // namespace net | 291 } // namespace net |
| 296 | 292 |
| 297 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 293 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |