MCPcopy Create free account
hub / github.com/XTLS/Go / RecordHeaderError

Struct RecordHeaderError

conn.go:584–595  ·  view source on GitHub ↗

RecordHeaderError is returned when a TLS record header is invalid.

Source from the content-addressed store, hash-verified

582
583// RecordHeaderError is returned when a TLS record header is invalid.
584type RecordHeaderError struct {
585 // Msg contains a human readable string that describes the error.
586 Msg string
587 // RecordHeader contains the five bytes of TLS record header that
588 // triggered the error.
589 RecordHeader [5]byte
590 // Conn provides the underlying net.Conn in the case that a client
591 // sent an initial handshake that didn't look like TLS.
592 // It is nil if there's already been a handshake or a TLS alert has
593 // been written to the connection.
594 Conn net.Conn
595}
596
597func (e RecordHeaderError) Error() string { return "tls: " + e.Msg }
598

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected