#include "test/network/traffic_route.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "absl/types/optional.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_minmax.h"
namespace webrtc {
namespace test {
namespace {
class NullReceiver : public EmulatedNetworkReceiverInterface { … };
class ActionReceiver : public EmulatedNetworkReceiverInterface { … };
}
CrossTrafficRouteImpl::CrossTrafficRouteImpl(
Clock* clock,
EmulatedNetworkReceiverInterface* receiver,
EmulatedEndpointImpl* endpoint)
: … { … }
CrossTrafficRouteImpl::~CrossTrafficRouteImpl() = default;
void CrossTrafficRouteImpl::TriggerPacketBurst(size_t num_packets,
size_t packet_size) { … }
void CrossTrafficRouteImpl::NetworkDelayedAction(size_t packet_size,
std::function<void()> action) { … }
void CrossTrafficRouteImpl::SendPacket(size_t packet_size) { … }
void CrossTrafficRouteImpl::SendPacket(size_t packet_size, uint16_t dest_port) { … }
}
}