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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 QuicTimeWaitListManager* time_wait_list_manager() { | 138 QuicTimeWaitListManager* time_wait_list_manager() { |
139 return time_wait_list_manager_.get(); | 139 return time_wait_list_manager_.get(); |
140 } | 140 } |
141 | 141 |
142 EpollServer* epoll_server() { return epoll_server_; } | 142 EpollServer* epoll_server() { return epoll_server_; } |
143 | 143 |
144 const QuicVersionVector& supported_versions() const { | 144 const QuicVersionVector& supported_versions() const { |
145 return supported_versions_; | 145 return supported_versions_; |
146 } | 146 } |
147 | 147 |
148 const QuicVersionVector& supported_versions_no_flow_control() const { | |
149 return supported_versions_no_flow_control_; | |
150 } | |
151 | |
152 const QuicVersionVector& supported_versions_no_connection_flow_control() | 148 const QuicVersionVector& supported_versions_no_connection_flow_control() |
153 const { | 149 const { |
154 return supported_versions_no_connection_flow_control_; | 150 return supported_versions_no_connection_flow_control_; |
155 } | 151 } |
156 | 152 |
157 const IPEndPoint& current_server_address() { | 153 const IPEndPoint& current_server_address() { |
158 return current_server_address_; | 154 return current_server_address_; |
159 } | 155 } |
160 const IPEndPoint& current_client_address() { | 156 const IPEndPoint& current_client_address() { |
161 return current_client_address_; | 157 return current_client_address_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 209 |
214 // The writer to write to the socket with. | 210 // The writer to write to the socket with. |
215 scoped_ptr<QuicPacketWriter> writer_; | 211 scoped_ptr<QuicPacketWriter> writer_; |
216 | 212 |
217 // This vector contains QUIC versions which we currently support. | 213 // This vector contains QUIC versions which we currently support. |
218 // This should be ordered such that the highest supported version is the first | 214 // This should be ordered such that the highest supported version is the first |
219 // element, with subsequent elements in descending order (versions can be | 215 // element, with subsequent elements in descending order (versions can be |
220 // skipped as necessary). | 216 // skipped as necessary). |
221 const QuicVersionVector supported_versions_; | 217 const QuicVersionVector supported_versions_; |
222 | 218 |
223 // Versions which do not support flow control (introduced in QUIC_VERSION_17). | |
224 // This is used to construct new QuicConnections when flow control is disabled | |
225 // via flag. | |
226 // TODO(rjshade): Remove this when | |
227 // FLAGS_enable_quic_stream_flow_control_2 is removed. | |
228 QuicVersionVector supported_versions_no_flow_control_; | |
229 // Versions which do not support *connection* flow control (introduced in | 219 // Versions which do not support *connection* flow control (introduced in |
230 // QUIC_VERSION_19). | 220 // QUIC_VERSION_19). |
231 // This is used to construct new QuicConnections when connection flow control | 221 // This is used to construct new QuicConnections when connection flow control |
232 // is disabled via flag. | 222 // is disabled via flag. |
233 // TODO(rjshade): Remove this when | 223 // TODO(rjshade): Remove this when |
234 // FLAGS_enable_quic_connection_flow_control_2 is removed. | 224 // FLAGS_enable_quic_connection_flow_control_2 is removed. |
235 QuicVersionVector supported_versions_no_connection_flow_control_; | 225 QuicVersionVector supported_versions_no_connection_flow_control_; |
236 | 226 |
237 // Information about the packet currently being handled. | 227 // Information about the packet currently being handled. |
238 IPEndPoint current_client_address_; | 228 IPEndPoint current_client_address_; |
239 IPEndPoint current_server_address_; | 229 IPEndPoint current_server_address_; |
240 const QuicEncryptedPacket* current_packet_; | 230 const QuicEncryptedPacket* current_packet_; |
241 | 231 |
242 QuicFramer framer_; | 232 QuicFramer framer_; |
243 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 233 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
244 | 234 |
245 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 235 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
246 }; | 236 }; |
247 | 237 |
248 } // namespace tools | 238 } // namespace tools |
249 } // namespace net | 239 } // namespace net |
250 | 240 |
251 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 241 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |