2020-11-25 19:35:31 +00:00
|
|
|
package udp
|
|
|
|
|
2021-03-30 20:57:53 +01:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"time"
|
|
|
|
)
|
2020-11-26 22:10:37 +00:00
|
|
|
|
2020-11-25 19:35:31 +00:00
|
|
|
type Congestion interface {
|
2021-03-30 20:57:53 +01:00
|
|
|
Sequence(ctx context.Context) (uint32, error)
|
2020-11-26 18:55:29 +00:00
|
|
|
NextAck() uint32
|
|
|
|
NextNack() uint32
|
2020-11-26 22:10:37 +00:00
|
|
|
|
2021-02-22 15:53:16 +00:00
|
|
|
ReceivedPacket(seq, nack, ack uint32)
|
|
|
|
|
2021-03-30 20:57:53 +01:00
|
|
|
AwaitEarlyUpdate(ctx context.Context, keepalive time.Duration) (uint32, error)
|
2020-11-25 19:35:31 +00:00
|
|
|
}
|