Add ability to create EmulatedNetworkNode from BuiltInNetworkBehaviorConfig

There is no public API to create NetworkBehaviorInterface from
BuiltInNetworkBehaviorConfig, so this CL will add direct method, that will
allow downstream projects to use BuiltInNetworkBehaviorConfig for network
emulation.

Bug: webrtc:10138
Change-Id: Iaec3ea17c12bd06b1c0ff3e5bc2b32cc1c4f62f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144628
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28494}
This commit is contained in:
Artem Titov
2019-07-05 13:09:48 +02:00
committed by Commit Bot
parent c8263e0638
commit 48b1b18065
4 changed files with 11 additions and 0 deletions

View File

@ -110,6 +110,8 @@ class NetworkEmulationManager {
// Creates an emulated network node, which represents single network in
// the emulated network layer.
virtual EmulatedNetworkNode* CreateEmulatedNode(
BuiltInNetworkBehaviorConfig config) = 0;
virtual EmulatedNetworkNode* CreateEmulatedNode(
std::unique_ptr<NetworkBehaviorInterface> network_behavior) = 0;