Implement loss recovery from the current WG draft

Fixes #498 and will hopefully go a long way towards fixing the many
flaky tests.
This commit is contained in:
Lucas Clemente
2017-03-24 18:28:59 +01:00
parent 959a8d0e4f
commit 1c5380c49b
9 changed files with 376 additions and 434 deletions

View File

@@ -12,18 +12,16 @@ type SentPacketHandler interface {
SentPacket(packet *Packet) error
ReceivedAck(ackFrame *frames.AckFrame, withPacketNumber protocol.PacketNumber, recvTime time.Time) error
SendingAllowed() bool
GetStopWaitingFrame(force bool) *frames.StopWaitingFrame
MaybeQueueRTOs()
DequeuePacketForRetransmission() (packet *Packet)
BytesInFlight() protocol.ByteCount
GetLeastUnacked() protocol.PacketNumber
SendingAllowed() bool
CheckForError() error
GetAlarmTimeout() time.Time
OnAlarm()
TimeOfFirstRTO() time.Time
// TODO(lclemente): Remove this now that the logic is simpler
CheckForError() error
}
// ReceivedPacketHandler handles ACKs needed to send for incoming packets