#include "rtc_base/test_client.h"
#include <string.h>
#include <memory>
#include <utility>
#include "api/units/timestamp.h"
#include "rtc_base/gunit.h"
#include "rtc_base/network/received_packet.h"
#include "rtc_base/thread.h"
#include "rtc_base/time_utils.h"
namespace rtc {
TestClient::TestClient(std::unique_ptr<AsyncPacketSocket> socket)
: … { … }
TestClient::TestClient(std::unique_ptr<AsyncPacketSocket> socket,
ThreadProcessingFakeClock* fake_clock)
: … { … }
TestClient::~TestClient() { … }
bool TestClient::CheckConnState(AsyncPacketSocket::State state) { … }
int TestClient::Send(const char* buf, size_t size) { … }
int TestClient::SendTo(const char* buf,
size_t size,
const SocketAddress& dest) { … }
std::unique_ptr<TestClient::Packet> TestClient::NextPacket(int timeout_ms) { … }
bool TestClient::CheckNextPacket(const char* buf,
size_t size,
SocketAddress* addr) { … }
bool TestClient::CheckTimestamp(
absl::optional<webrtc::Timestamp> packet_timestamp) { … }
void TestClient::AdvanceTime(int ms) { … }
bool TestClient::CheckNoPacket() { … }
int TestClient::GetError() { … }
int TestClient::SetOption(Socket::Option opt, int value) { … }
void TestClient::OnPacket(AsyncPacketSocket* socket,
const rtc::ReceivedPacket& received_packet) { … }
void TestClient::OnReadyToSend(AsyncPacketSocket* socket) { … }
TestClient::Packet::Packet(const rtc::ReceivedPacket& received_packet)
: … { … }
TestClient::Packet::Packet(const Packet& p)
: … { … }
}