#include "quiche/quic/test_tools/packet_dropping_test_writer.h"
#include <memory>
#include <utility>
#include "quiche/quic/platform/api/quic_logging.h"
namespace quic {
namespace test {
const int32_t kMinSuccesfulWritesAfterPacketLoss = …;
class WriteUnblockedAlarm : public QuicAlarm::DelegateWithoutContext { … };
class DelayAlarm : public QuicAlarm::DelegateWithoutContext { … };
PacketDroppingTestWriter::PacketDroppingTestWriter()
: … { … }
PacketDroppingTestWriter::~PacketDroppingTestWriter() { … }
void PacketDroppingTestWriter::Initialize(
QuicConnectionHelperInterface* helper, QuicAlarmFactory* alarm_factory,
std::unique_ptr<Delegate> on_can_write) { … }
WriteResult PacketDroppingTestWriter::WritePacket(
const char* buffer, size_t buf_len, const QuicIpAddress& self_address,
const QuicSocketAddress& peer_address, PerPacketOptions* options,
const QuicPacketWriterParams& params) { … }
bool PacketDroppingTestWriter::IsWriteBlocked() const { … }
void PacketDroppingTestWriter::SetWritable() { … }
QuicTime PacketDroppingTestWriter::ReleaseNextPacket() { … }
QuicTime PacketDroppingTestWriter::ReleaseOldPackets() { … }
void PacketDroppingTestWriter::SetDelayAlarm(QuicTime new_deadline) { … }
void PacketDroppingTestWriter::OnCanWrite() { … }
PacketDroppingTestWriter::DelayedWrite::DelayedWrite(
const char* buffer, size_t buf_len, const QuicIpAddress& self_address,
const QuicSocketAddress& peer_address,
std::unique_ptr<PerPacketOptions> options,
const QuicPacketWriterParams& params, QuicTime send_time)
: … { … }
PacketDroppingTestWriter::DelayedWrite::~DelayedWrite() = default;
}
}