dnscrypt-proxy/vendor/github.com/quic-go/quic-go/internal/wire/ping_frame.go

18 lines
355 B
Go
Raw Normal View History

2022-07-21 18:50:10 +02:00
package wire
import (
"github.com/quic-go/quic-go/internal/protocol"
2022-07-21 18:50:10 +02:00
)
// A PingFrame is a PING frame
type PingFrame struct{}
2024-03-26 19:56:06 +01:00
func (f *PingFrame) Append(b []byte, _ protocol.Version) ([]byte, error) {
2023-05-01 16:05:02 +02:00
return append(b, pingFrameType), nil
2022-07-21 18:50:10 +02:00
}
// Length of a written frame
2024-03-26 19:56:06 +01:00
func (f *PingFrame) Length(_ protocol.Version) protocol.ByteCount {
2022-07-21 18:50:10 +02:00
return 1
}