mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-30 22:34:15 -05:00
dfbc2e81e3
quic-go now vendors all of its dependencies, so we don't need to vendor them here. Created by running: gvt delete github.com/lucas-clemente/quic-go gvt delete github.com/bifurcation/mint gvt delete github.com/lucas-clemente/aes12 gvt delete github.com/lucas-clemente/fnv128a gvt delete github.com/lucas-clemente/quic-go-certificates gvt delete github.com/aead/chacha20 gvt delete github.com/hashicorp/golang-lru gvt fetch -tag v0.10.0-no-integrationtests github.com/lucas-clemente/quic-go
40 lines
850 B
Go
40 lines
850 B
Go
package ackhandler
|
|
|
|
import "fmt"
|
|
|
|
// The SendMode says what kind of packets can be sent.
|
|
type SendMode uint8
|
|
|
|
const (
|
|
// SendNone means that no packets should be sent
|
|
SendNone SendMode = iota
|
|
// SendAck means an ACK-only packet should be sent
|
|
SendAck
|
|
// SendRetransmission means that retransmissions should be sent
|
|
SendRetransmission
|
|
// SendRTO means that an RTO probe packet should be sent
|
|
SendRTO
|
|
// SendTLP means that a TLP probe packet should be sent
|
|
SendTLP
|
|
// SendAny means that any packet should be sent
|
|
SendAny
|
|
)
|
|
|
|
func (s SendMode) String() string {
|
|
switch s {
|
|
case SendNone:
|
|
return "none"
|
|
case SendAck:
|
|
return "ack"
|
|
case SendRetransmission:
|
|
return "retransmission"
|
|
case SendRTO:
|
|
return "rto"
|
|
case SendTLP:
|
|
return "tlp"
|
|
case SendAny:
|
|
return "any"
|
|
default:
|
|
return fmt.Sprintf("invalid send mode: %d", s)
|
|
}
|
|
}
|