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 #include "net/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "net/quic/core/crypto/quic_random.h" | 10 #include "net/quic/core/crypto/quic_random.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 } // namespace | 188 } // namespace |
189 | 189 |
190 QuicDispatcher::QuicDispatcher( | 190 QuicDispatcher::QuicDispatcher( |
191 const QuicConfig& config, | 191 const QuicConfig& config, |
192 const QuicCryptoServerConfig* crypto_config, | 192 const QuicCryptoServerConfig* crypto_config, |
193 QuicVersionManager* version_manager, | 193 QuicVersionManager* version_manager, |
194 std::unique_ptr<QuicConnectionHelperInterface> helper, | 194 std::unique_ptr<QuicConnectionHelperInterface> helper, |
195 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, | 195 std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, |
196 std::unique_ptr<QuicAlarmFactory> alarm_factory) | 196 std::unique_ptr<QuicAlarmFactory> alarm_factory) |
197 : config_(config), | 197 : num_push_promise_sent_(0), |
| 198 config_(config), |
198 crypto_config_(crypto_config), | 199 crypto_config_(crypto_config), |
199 compressed_certs_cache_( | 200 compressed_certs_cache_( |
200 QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), | 201 QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), |
201 helper_(std::move(helper)), | 202 helper_(std::move(helper)), |
202 session_helper_(std::move(session_helper)), | 203 session_helper_(std::move(session_helper)), |
203 alarm_factory_(std::move(alarm_factory)), | 204 alarm_factory_(std::move(alarm_factory)), |
204 delete_sessions_alarm_( | 205 delete_sessions_alarm_( |
205 alarm_factory_->CreateAlarm(new DeleteSessionsAlarm(this))), | 206 alarm_factory_->CreateAlarm(new DeleteSessionsAlarm(this))), |
206 buffered_packets_(this, helper_->GetClock(), alarm_factory_.get()), | 207 buffered_packets_(this, helper_->GetClock(), alarm_factory_.get()), |
207 current_packet_(nullptr), | 208 current_packet_(nullptr), |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 "not blocked."; | 520 "not blocked."; |
520 // Return without adding the connection to the blocked list, to avoid | 521 // Return without adding the connection to the blocked list, to avoid |
521 // infinite loops in OnCanWrite. | 522 // infinite loops in OnCanWrite. |
522 return; | 523 return; |
523 } | 524 } |
524 write_blocked_list_.insert(std::make_pair(blocked_writer, true)); | 525 write_blocked_list_.insert(std::make_pair(blocked_writer, true)); |
525 } | 526 } |
526 | 527 |
527 void QuicDispatcher::OnRstStreamReceived(const QuicRstStreamFrame& frame) {} | 528 void QuicDispatcher::OnRstStreamReceived(const QuicRstStreamFrame& frame) {} |
528 | 529 |
| 530 void QuicDispatcher::OnPushPromiseSent() {} |
| 531 |
529 void QuicDispatcher::OnConnectionAddedToTimeWaitList( | 532 void QuicDispatcher::OnConnectionAddedToTimeWaitList( |
530 QuicConnectionId connection_id) { | 533 QuicConnectionId connection_id) { |
531 QUIC_DLOG(INFO) << "Connection " << connection_id | 534 QUIC_DLOG(INFO) << "Connection " << connection_id |
532 << " added to time wait list."; | 535 << " added to time wait list."; |
533 } | 536 } |
534 | 537 |
535 void QuicDispatcher::OnPacket() {} | 538 void QuicDispatcher::OnPacket() {} |
536 | 539 |
537 void QuicDispatcher::OnError(QuicFramer* framer) { | 540 void QuicDispatcher::OnError(QuicFramer* framer) { |
538 QuicErrorCode error = framer->error(); | 541 QuicErrorCode error = framer->error(); |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 void QuicDispatcher::DeliverPacketsToSession( | 990 void QuicDispatcher::DeliverPacketsToSession( |
988 const std::list<BufferedPacket>& packets, | 991 const std::list<BufferedPacket>& packets, |
989 QuicSession* session) { | 992 QuicSession* session) { |
990 for (const BufferedPacket& packet : packets) { | 993 for (const BufferedPacket& packet : packets) { |
991 session->ProcessUdpPacket(packet.server_address, packet.client_address, | 994 session->ProcessUdpPacket(packet.server_address, packet.client_address, |
992 *(packet.packet)); | 995 *(packet.packet)); |
993 } | 996 } |
994 } | 997 } |
995 | 998 |
996 } // namespace net | 999 } // namespace net |
OLD | NEW |