Jake Hillion
9a19ecd0d4
All checks were successful
continuous-integration/drone/push Build is passing
27 lines
569 B
Go
27 lines
569 B
Go
package congestion
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
type None struct{}
|
|
|
|
func NewNone() None {
|
|
return None{}
|
|
}
|
|
|
|
func (c None) String() string {
|
|
return fmt.Sprintf("{None}")
|
|
}
|
|
|
|
func (c None) ReceivedPacket(uint32, uint32, uint32) {}
|
|
func (c None) NextNack() uint32 { return 0 }
|
|
func (c None) NextAck() uint32 { return 0 }
|
|
func (c None) AwaitEarlyUpdate(ctx context.Context, _ time.Duration) (uint32, error) {
|
|
<-ctx.Done()
|
|
return 0, ctx.Err()
|
|
}
|
|
func (c None) Sequence(context.Context) (uint32, error) { return 0, nil }
|