1
1
#include " adaptor.h"
2
2
3
- #include " go_quic_dispatcher .h"
3
+ #include " go_quic_simple_dispatcher .h"
4
4
#include " go_quic_connection_helper.h"
5
5
#include " go_quic_server_packet_writer.h"
6
6
#include " go_quic_simple_server_stream.h"
11
11
#include " proof_source_goquic.h"
12
12
#include " go_ephemeral_key_source.h"
13
13
14
- #include " net/quic/quic_connection.h"
15
- #include " net/quic/quic_clock.h"
16
- #include " net/quic/quic_time.h"
17
- #include " net/quic/quic_protocol.h"
18
- #include " net/quic/crypto/quic_random.h"
19
- #include " net/quic/crypto/crypto_server_config_protobuf.h"
14
+ #include " net/quic/core/ quic_connection.h"
15
+ #include " net/quic/core/ quic_clock.h"
16
+ #include " net/quic/core/ quic_time.h"
17
+ #include " net/quic/core/ quic_protocol.h"
18
+ #include " net/quic/core/ crypto/quic_random.h"
19
+ #include " net/quic/core/ crypto/crypto_server_config_protobuf.h"
20
20
#include " net/base/ip_address.h"
21
21
#include " net/base/ip_endpoint.h"
22
22
#include " base/strings/string_piece.h"
@@ -163,7 +163,7 @@ void delete_crypto_config(QuicCryptoServerConfig* crypto_config) {
163
163
delete crypto_config;
164
164
}
165
165
166
- GoQuicDispatcher * create_quic_dispatcher (
166
+ GoQuicSimpleDispatcher * create_quic_dispatcher (
167
167
GoPtr go_writer,
168
168
GoPtr go_quic_dispatcher,
169
169
GoPtr go_task_runner,
@@ -176,9 +176,12 @@ GoQuicDispatcher* create_quic_dispatcher(
176
176
177
177
std::unique_ptr<QuicConnectionHelperInterface> helper (new GoQuicConnectionHelper (clock , random_generator));
178
178
std::unique_ptr<QuicAlarmFactory> alarm_factory (new GoQuicAlarmFactory (clock , go_task_runner));
179
- std::unique_ptr<QuicServerSessionBase::Helper> session_helper (new GoQuicSimpleServerSessionHelper (QuicRandom::GetInstance ()));
179
+ std::unique_ptr<QuicCryptoServerStream::Helper> session_helper (new GoQuicSimpleServerSessionHelper (QuicRandom::GetInstance ()));
180
+ // XXX: quic_server uses QuicSimpleCryptoServerStreamHelper,
181
+ // while quic_simple_server uses QuicSimpleServerSessionHelper.
182
+ // Pick one and remove the other later
180
183
181
- QuicVersionVector versions (net::QuicSupportedVersions ());
184
+ QuicVersionManager* version_manager = new QuicVersionManager (net::AllSupportedVersions ());
182
185
183
186
/* Initialize Configs ------------------------------------------------*/
184
187
@@ -199,8 +202,9 @@ GoQuicDispatcher* create_quic_dispatcher(
199
202
/* Initialize Configs Ends ----------------------------------------*/
200
203
201
204
// Deleted by delete_go_quic_dispatcher()
202
- GoQuicDispatcher* dispatcher =
203
- new GoQuicDispatcher (*config, crypto_config, versions, std::move (helper), std::move (session_helper), std::move (alarm_factory), go_quic_dispatcher);
205
+ GoQuicSimpleDispatcher* dispatcher =
206
+ new GoQuicSimpleDispatcher (*config, crypto_config, version_manager,
207
+ std::move (helper), std::move (session_helper), std::move (alarm_factory), go_quic_dispatcher);
204
208
205
209
GoQuicServerPacketWriter* writer = new GoQuicServerPacketWriter (
206
210
go_writer, dispatcher); // Deleted by scoped ptr of GoQuicDispatcher
@@ -210,11 +214,11 @@ GoQuicDispatcher* create_quic_dispatcher(
210
214
return dispatcher;
211
215
}
212
216
213
- void delete_go_quic_dispatcher (GoQuicDispatcher * dispatcher) {
217
+ void delete_go_quic_dispatcher (GoQuicSimpleDispatcher * dispatcher) {
214
218
delete dispatcher;
215
219
}
216
220
217
- void quic_dispatcher_process_packet (GoQuicDispatcher * dispatcher,
221
+ void quic_dispatcher_process_packet (GoQuicSimpleDispatcher * dispatcher,
218
222
uint8_t * self_address_ip,
219
223
size_t self_address_len,
220
224
uint16_t self_address_port,
0 commit comments