/* * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
void CrossTrafficRouteImpl::TriggerPacketBurst(size_t num_packets,
size_t packet_size) { for (size_t i = 0; i < num_packets; ++i) {
SendPacket(packet_size);
}
}
void CrossTrafficRouteImpl::NetworkDelayedAction(size_t packet_size,
std::function<void()> action) { auto action_receiver = std::make_unique<ActionReceiver>(action); // BindOneShotReceiver arranges to free the port in the endpoint after the // action is done.
std::optional<uint16_t> port =
endpoint_->BindOneShotReceiver(0, action_receiver.get());
RTC_DCHECK(port);
actions_.push_back(std::move(action_receiver));
SendPacket(packet_size, port.value());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.