OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 remote_test_done_ = false; | 56 remote_test_done_ = false; |
57 NetworkTesterPacket packet; | 57 NetworkTesterPacket packet; |
58 packet.set_type(NetworkTesterPacket::START_SEND); | 58 packet.set_type(NetworkTesterPacket::START_SEND); |
59 udp_transport_->SetRemoteAddress(remote_addr); | 59 udp_transport_->SetRemoteAddress(remote_addr); |
60 SendData(packet, rtc::Optional<size_t>()); | 60 SendData(packet, rtc::Optional<size_t>()); |
61 packet_sender_.reset(new PacketSender(this, config_file_path_)); | 61 packet_sender_.reset(new PacketSender(this, config_file_path_)); |
62 packet_sender_->StartSending(); | 62 packet_sender_->StartSending(); |
63 break; | 63 break; |
64 } | 64 } |
65 case NetworkTesterPacket::START_SEND: { | 65 case NetworkTesterPacket::START_SEND: { |
| 66 local_test_done_ = false; |
| 67 remote_test_done_ = false; |
66 packet_sender_.reset(new PacketSender(this, config_file_path_)); | 68 packet_sender_.reset(new PacketSender(this, config_file_path_)); |
67 packet_sender_->StartSending(); | 69 packet_sender_->StartSending(); |
68 break; | 70 break; |
69 } | 71 } |
70 case NetworkTesterPacket::TEST_DATA: { | 72 case NetworkTesterPacket::TEST_DATA: { |
71 packet.set_arrival_timestamp(packet_time.timestamp); | 73 packet.set_arrival_timestamp(packet_time.timestamp); |
72 packet.set_packet_size(len); | 74 packet.set_packet_size(len); |
73 packet_logger_.LogPacket(packet); | 75 packet_logger_.LogPacket(packet); |
74 break; | 76 break; |
75 } | 77 } |
(...skipping 17 matching lines...) Expand all Loading... |
93 } | 95 } |
94 | 96 |
95 void TestController::OnTestDone() { | 97 void TestController::OnTestDone() { |
96 NetworkTesterPacket packet; | 98 NetworkTesterPacket packet; |
97 packet.set_type(NetworkTesterPacket::TEST_DONE); | 99 packet.set_type(NetworkTesterPacket::TEST_DONE); |
98 SendData(packet, rtc::Optional<size_t>()); | 100 SendData(packet, rtc::Optional<size_t>()); |
99 local_test_done_ = true; | 101 local_test_done_ = true; |
100 } | 102 } |
101 | 103 |
102 } // namespace webrtc | 104 } // namespace webrtc |
OLD | NEW |