route/vendor/github.com/lucas-clemente/quic-go/ackhandler/interfaces.go

36 lines
1.1 KiB
Go
Raw Normal View History

2017-12-12 02:51:45 +00:00
package ackhandler
import (
"time"
2018-01-03 19:19:49 +00:00
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/wire"
2017-12-12 02:51:45 +00:00
)
// SentPacketHandler handles ACKs received for outgoing packets
type SentPacketHandler interface {
2018-01-03 19:19:49 +00:00
// SentPacket may modify the packet
2017-12-12 02:51:45 +00:00
SentPacket(packet *Packet) error
2018-01-03 19:19:49 +00:00
ReceivedAck(ackFrame *wire.AckFrame, withPacketNumber protocol.PacketNumber, encLevel protocol.EncryptionLevel, recvTime time.Time) error
SetHandshakeComplete()
2017-12-12 02:51:45 +00:00
SendingAllowed() bool
2018-01-03 19:19:49 +00:00
GetStopWaitingFrame(force bool) *wire.StopWaitingFrame
2018-01-20 18:07:01 +00:00
GetLowestPacketNotConfirmedAcked() protocol.PacketNumber
2018-01-03 19:19:49 +00:00
ShouldSendRetransmittablePacket() bool
2017-12-12 02:51:45 +00:00
DequeuePacketForRetransmission() (packet *Packet)
GetLeastUnacked() protocol.PacketNumber
GetAlarmTimeout() time.Time
OnAlarm()
}
// ReceivedPacketHandler handles ACKs needed to send for incoming packets
type ReceivedPacketHandler interface {
2018-01-20 18:07:01 +00:00
ReceivedPacket(packetNumber protocol.PacketNumber, rcvTime time.Time, shouldInstigateAck bool) error
2018-01-03 19:19:49 +00:00
IgnoreBelow(protocol.PacketNumber)
2017-12-12 02:51:45 +00:00
2018-01-03 19:19:49 +00:00
GetAlarmTimeout() time.Time
GetAckFrame() *wire.AckFrame
2017-12-12 02:51:45 +00:00
}