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_server.h" | 5 #include "net/tools/quic/quic_server.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <features.h> | 8 #include <features.h> |
9 #include <netinet/in.h> | 9 #include <netinet/in.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 30 matching lines...) Expand all Loading... |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 QuicServer::QuicServer() | 43 QuicServer::QuicServer() |
44 : port_(0), | 44 : port_(0), |
45 fd_(-1), | 45 fd_(-1), |
46 packets_dropped_(0), | 46 packets_dropped_(0), |
47 overflow_supported_(false), | 47 overflow_supported_(false), |
48 use_recvmmsg_(false), | 48 use_recvmmsg_(false), |
49 crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance()), | 49 crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance()), |
50 supported_versions_(QuicSupportedVersions()) { | 50 supported_versions_(QuicSupportedVersions()) { |
51 // Use hardcoded crypto parameters for now. | |
52 config_.SetDefaults(); | |
53 Initialize(); | 51 Initialize(); |
54 } | 52 } |
55 | 53 |
56 QuicServer::QuicServer(const QuicConfig& config, | 54 QuicServer::QuicServer(const QuicConfig& config, |
57 const QuicVersionVector& supported_versions) | 55 const QuicVersionVector& supported_versions) |
58 : port_(0), | 56 : port_(0), |
59 fd_(-1), | 57 fd_(-1), |
60 packets_dropped_(0), | 58 packets_dropped_(0), |
61 overflow_supported_(false), | 59 overflow_supported_(false), |
62 use_recvmmsg_(false), | 60 use_recvmmsg_(false), |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 QuicEncryptedPacket packet(buf, bytes_read, false); | 227 QuicEncryptedPacket packet(buf, bytes_read, false); |
230 | 228 |
231 IPEndPoint server_address(server_ip, port); | 229 IPEndPoint server_address(server_ip, port); |
232 processor->ProcessPacket(server_address, client_address, packet); | 230 processor->ProcessPacket(server_address, client_address, packet); |
233 | 231 |
234 return true; | 232 return true; |
235 } | 233 } |
236 | 234 |
237 } // namespace tools | 235 } // namespace tools |
238 } // namespace net | 236 } // namespace net |
OLD | NEW |