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 <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 server_thread_->Initialize(); | 386 server_thread_->Initialize(); |
387 server_address_ = IPEndPoint(server_address_.address(), | 387 server_address_ = IPEndPoint(server_address_.address(), |
388 server_thread_->GetPort()); | 388 server_thread_->GetPort()); |
389 QuicDispatcher* dispatcher = | 389 QuicDispatcher* dispatcher = |
390 QuicServerPeer::GetDispatcher(server_thread_->server()); | 390 QuicServerPeer::GetDispatcher(server_thread_->server()); |
391 TestWriterFactory* packet_writer_factory = new TestWriterFactory(); | 391 TestWriterFactory* packet_writer_factory = new TestWriterFactory(); |
392 QuicDispatcherPeer::SetPacketWriterFactory(dispatcher, | 392 QuicDispatcherPeer::SetPacketWriterFactory(dispatcher, |
393 packet_writer_factory); | 393 packet_writer_factory); |
394 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_); | 394 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_); |
395 | 395 |
396 if (GetParam().server_uses_stateless_rejects_if_peer_supported) { | 396 FLAGS_enable_quic_stateless_reject_support = |
397 // Enable stateless rejects and force the server to always send | 397 GetParam().server_uses_stateless_rejects_if_peer_supported; |
398 // them. | |
399 FLAGS_enable_quic_stateless_reject_support = true; | |
400 FLAGS_quic_session_map_threshold_for_stateless_rejects = 0; | |
401 } else { | |
402 FLAGS_enable_quic_stateless_reject_support = false; | |
403 FLAGS_quic_session_map_threshold_for_stateless_rejects = -1; | |
404 } | |
405 | 398 |
406 server_writer_->Initialize( | 399 server_writer_->Initialize( |
407 QuicDispatcherPeer::GetHelper(dispatcher), | 400 QuicDispatcherPeer::GetHelper(dispatcher), |
408 new ServerDelegate(dispatcher)); | 401 new ServerDelegate(dispatcher)); |
409 if (stream_factory_ != nullptr) { | 402 if (stream_factory_ != nullptr) { |
410 static_cast<QuicTestServer*>(server_thread_->server()) | 403 static_cast<QuicTestServer*>(server_thread_->server()) |
411 ->SetSpdyStreamFactory(stream_factory_); | 404 ->SetSpdyStreamFactory(stream_factory_); |
412 } | 405 } |
413 | 406 |
414 server_thread_->Start(); | 407 server_thread_->Start(); |
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 // There will be buffered data to write in the client's stream. | 2087 // There will be buffered data to write in the client's stream. |
2095 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); | 2088 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); |
2096 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); | 2089 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); |
2097 } | 2090 } |
2098 } | 2091 } |
2099 | 2092 |
2100 } // namespace | 2093 } // namespace |
2101 } // namespace test | 2094 } // namespace test |
2102 } // namespace tools | 2095 } // namespace tools |
2103 } // namespace net | 2096 } // namespace net |
OLD | NEW |