Rename NetworkSimulationInterface into NetworkBehaviorInterface.
This name will better describe what implementation should do and how users will interact with this class. The real simulation is done by FakeNetworkPipe and this class is just operates with packages metadata, so it is more about describing behavior. Bug: webrtc:9630 Change-Id: I00977e6be0ca84e7c233b4c35f0677e8263e4382 Reviewed-on: https://webrtc-review.googlesource.com/c/95944 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24989}
This commit is contained in:
@ -42,9 +42,9 @@ struct PacketDeliveryInfo {
|
||||
uint64_t packet_id;
|
||||
};
|
||||
|
||||
// DefaultNetworkSimulationConfig is a default network simulation configuration
|
||||
// for default network simulation that will be used by WebRTC if no custom
|
||||
// NetworkSimulationInterface is provided.
|
||||
// DefaultNetworkSimulationConfig is a default network behavior configuration
|
||||
// for default network behavior that will be used by WebRTC if no custom
|
||||
// NetworkBehaviorInterface is provided.
|
||||
struct DefaultNetworkSimulationConfig {
|
||||
DefaultNetworkSimulationConfig() {}
|
||||
// Queue length in number of packets.
|
||||
@ -63,7 +63,7 @@ struct DefaultNetworkSimulationConfig {
|
||||
int avg_burst_loss_length = -1;
|
||||
};
|
||||
|
||||
class NetworkSimulationInterface {
|
||||
class NetworkBehaviorInterface {
|
||||
public:
|
||||
virtual bool EnqueuePacket(PacketInFlightInfo packet_info) = 0;
|
||||
// Retrieves all packets that should be delivered by the given receive time.
|
||||
@ -72,9 +72,12 @@ class NetworkSimulationInterface {
|
||||
// Returns time in microseconds when caller should call
|
||||
// DequeueDeliverablePackets to get next set of packets to deliver.
|
||||
virtual absl::optional<int64_t> NextDeliveryTimeUs() const = 0;
|
||||
virtual ~NetworkSimulationInterface() = default;
|
||||
virtual ~NetworkBehaviorInterface() = default;
|
||||
};
|
||||
|
||||
// Deprecated. DO NOT USE. Use NetworkBehaviorInterface instead.
|
||||
using NetworkSimulationInterface = NetworkBehaviorInterface;
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_TEST_SIMULATED_NETWORK_H_
|
||||
|
||||
Reference in New Issue
Block a user