Adds queue length setter to simulated network node builder.

Bug: webrtc:9883
Change-Id: Icf3d2c78200f0a5e716c872ab973af0e4026f362
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161305
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30071}
This commit is contained in:
Sebastian Jansson
2019-12-11 19:29:57 +01:00
parent ce911263a4
commit 3927298c22
2 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,13 @@ NetworkEmulationManager::SimulatedNetworkNode::Builder::loss(double loss_rate) {
return *this;
}
NetworkEmulationManager::SimulatedNetworkNode::Builder&
NetworkEmulationManager::SimulatedNetworkNode::Builder::packet_queue_length(
int max_queue_length_in_packets) {
config_.queue_length_packets = max_queue_length_in_packets;
return *this;
}
NetworkEmulationManager::SimulatedNetworkNode
NetworkEmulationManager::SimulatedNetworkNode::Builder::Build() const {
RTC_CHECK(net_);

View File

@ -92,6 +92,7 @@ class NetworkEmulationManager {
Builder& capacity_kbps(int link_capacity_kbps);
Builder& capacity_Mbps(int link_capacity_Mbps);
Builder& loss(double loss_rate);
Builder& packet_queue_length(int max_queue_length_in_packets);
SimulatedNetworkNode Build() const;
SimulatedNetworkNode Build(NetworkEmulationManager* net) const;