mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
33 lines
973 B
Go
33 lines
973 B
Go
package ackhandler
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/lucas-clemente/quic-go/internal/protocol"
|
|
"github.com/lucas-clemente/quic-go/internal/wire"
|
|
)
|
|
|
|
// SentPacketHandler handles ACKs received for outgoing packets
|
|
type SentPacketHandler interface {
|
|
// SentPacket may modify the packet
|
|
SentPacket(packet *Packet) error
|
|
ReceivedAck(ackFrame *wire.AckFrame, withPacketNumber protocol.PacketNumber, recvTime time.Time) error
|
|
|
|
SendingAllowed() bool
|
|
GetStopWaitingFrame(force bool) *wire.StopWaitingFrame
|
|
ShouldSendRetransmittablePacket() bool
|
|
DequeuePacketForRetransmission() (packet *Packet)
|
|
GetLeastUnacked() protocol.PacketNumber
|
|
|
|
GetAlarmTimeout() time.Time
|
|
OnAlarm()
|
|
}
|
|
|
|
// ReceivedPacketHandler handles ACKs needed to send for incoming packets
|
|
type ReceivedPacketHandler interface {
|
|
ReceivedPacket(packetNumber protocol.PacketNumber, shouldInstigateAck bool) error
|
|
SetLowerLimit(protocol.PacketNumber)
|
|
|
|
GetAlarmTimeout() time.Time
|
|
GetAckFrame() *wire.AckFrame
|
|
}
|