#include "cast/streaming/public/environment.h"
#include <algorithm>
#include <utility>
#include "cast/streaming/impl/rtp_defines.h"
#include "platform/api/task_runner.h"
#include "platform/base/span.h"
#include "util/osp_logging.h"
namespace openscreen::cast {
Environment::PacketConsumer::~PacketConsumer() = default;
Environment::SocketSubscriber::~SocketSubscriber() = default;
Environment::Environment(ClockNowFunctionPtr now_function,
TaskRunner& task_runner,
const IPEndpoint& local_endpoint)
: … { … }
Environment::~Environment() = default;
IPEndpoint Environment::GetBoundLocalEndpoint() const { … }
void Environment::SetSocketStateForTesting(SocketState state) { … }
void Environment::SetSocketSubscriber(SocketSubscriber* subscriber) { … }
void Environment::SetStatisticsCollector(StatisticsCollector* collector) { … }
void Environment::ConsumeIncomingPackets(PacketConsumer* packet_consumer) { … }
void Environment::DropIncomingPackets() { … }
int Environment::GetMaxPacketSize() const { … }
void Environment::SendPacket(ByteView packet, PacketMetadata metadata) { … }
void Environment::OnBound(UdpSocket* socket) { … }
void Environment::OnError(UdpSocket* socket, const Error& error) { … }
void Environment::OnSendError(UdpSocket* socket, const Error& error) { … }
void Environment::OnRead(UdpSocket* socket,
ErrorOr<UdpPacket> packet_or_error) { … }
}