Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (28 sloc) 612 Bytes
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
// SendPTO means that a probe packet should be sent
// SendAny means that any packet should be sent
func (s SendMode) String() string {
switch s {
case SendNone:
return "none"
case SendAck:
return "ack"
case SendPTO:
return "pto"
case SendAny:
return "any"
return fmt.Sprintf("invalid send mode: %d", s)
You can’t perform that action at this time.