uquic/internal/wire/interface.go
2019-01-28 16:09:47 +09:00

18 lines
380 B
Go

package wire
import (
"bytes"
"github.com/lucas-clemente/quic-go/internal/protocol"
)
// A Frame in QUIC
type Frame interface {
Write(b *bytes.Buffer, version protocol.VersionNumber) error
Length(version protocol.VersionNumber) protocol.ByteCount
}
// A FrameParser parses QUIC frames, one by one.
type FrameParser interface {
ParseNext(r *bytes.Reader) (Frame, error)
}