mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
27 lines
673 B
Go
27 lines
673 B
Go
package wire
|
|
|
|
import (
|
|
"bytes"
|
|
|
|
"github.com/quic-go/quic-go/internal/protocol"
|
|
)
|
|
|
|
// A HandshakeDoneFrame is a HANDSHAKE_DONE frame
|
|
type HandshakeDoneFrame struct{}
|
|
|
|
// ParseHandshakeDoneFrame parses a HandshakeDone frame
|
|
func parseHandshakeDoneFrame(r *bytes.Reader, _ protocol.VersionNumber) (*HandshakeDoneFrame, error) {
|
|
if _, err := r.ReadByte(); err != nil {
|
|
return nil, err
|
|
}
|
|
return &HandshakeDoneFrame{}, nil
|
|
}
|
|
|
|
func (f *HandshakeDoneFrame) Append(b []byte, _ protocol.VersionNumber) ([]byte, error) {
|
|
return append(b, 0x1e), nil
|
|
}
|
|
|
|
// Length of a written frame
|
|
func (f *HandshakeDoneFrame) Length(_ protocol.VersionNumber) protocol.ByteCount {
|
|
return 1
|
|
}
|