OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_simple_server.h" | 5 #include "net/tools/quic/quic_simple_server.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 static_cast<QuicSimpleServerPacketWriter*>(writer())); | 57 static_cast<QuicSimpleServerPacketWriter*>(writer())); |
58 } | 58 } |
59 }; | 59 }; |
60 | 60 |
61 } // namespace | 61 } // namespace |
62 | 62 |
63 QuicSimpleServer::QuicSimpleServer(ProofSource* proof_source, | 63 QuicSimpleServer::QuicSimpleServer(ProofSource* proof_source, |
64 const QuicConfig& config, | 64 const QuicConfig& config, |
65 const QuicVersionVector& supported_versions) | 65 const QuicVersionVector& supported_versions) |
66 : helper_( | 66 : helper_( |
67 new QuicConnectionHelper(base::ThreadTaskRunnerHandle::Get().get(), | 67 new QuicChromiumConnectionHelper(base::ThreadTaskRunnerHandle::Get() |
68 &clock_, | 68 .get(), |
69 QuicRandom::GetInstance())), | 69 &clock_, |
| 70 QuicRandom::GetInstance())), |
70 config_(config), | 71 config_(config), |
71 crypto_config_(kSourceAddressTokenSecret, | 72 crypto_config_(kSourceAddressTokenSecret, |
72 QuicRandom::GetInstance(), | 73 QuicRandom::GetInstance(), |
73 proof_source), | 74 proof_source), |
74 supported_versions_(supported_versions), | 75 supported_versions_(supported_versions), |
75 read_pending_(false), | 76 read_pending_(false), |
76 synchronous_read_count_(0), | 77 synchronous_read_count_(0), |
77 read_buffer_(new IOBufferWithSize(kReadBufferSize)), | 78 read_buffer_(new IOBufferWithSize(kReadBufferSize)), |
78 weak_factory_(this) { | 79 weak_factory_(this) { |
79 Initialize(); | 80 Initialize(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 } | 204 } |
204 | 205 |
205 QuicEncryptedPacket packet(read_buffer_->data(), result, false); | 206 QuicEncryptedPacket packet(read_buffer_->data(), result, false); |
206 dispatcher_->ProcessPacket(server_address_, client_address_, packet); | 207 dispatcher_->ProcessPacket(server_address_, client_address_, packet); |
207 | 208 |
208 StartReading(); | 209 StartReading(); |
209 } | 210 } |
210 | 211 |
211 } // namespace tools | 212 } // namespace tools |
212 } // namespace net | 213 } // namespace net |
OLD | NEW |