Documentation ¶
Index ¶
- Variables
- func AcquireBodyStream(b *bytebufferpool.ByteBuffer, r network.Reader, t *protocol.Trailer, ...) io.Reader
- func BufferSnippet(b []byte) string
- func HasHeaderValue(s, value []byte) bool
- func HeaderError(typ string, err, errParse error, b []byte) error
- func LimitedReaderSize(r io.Reader) int64
- func MustDiscard(r network.Reader, n int)
- func MustPeekBuffered(r network.Reader) []byte
- func ReadBody(r network.Reader, contentLength, maxBodySize int, dst []byte) ([]byte, error)
- func ReadBodyWithStreaming(zr network.Reader, contentLength, maxBodySize int, dst []byte) (b []byte, err error)
- func ReadRawHeaders(dst, buf []byte) ([]byte, int, error)
- func ReadTrailer(t *protocol.Trailer, r network.Reader) error
- func ReleaseBodyStream(requestReader io.Reader) (err error)
- func SkipTrailer(r network.Reader) error
- func WriteBodyChunked(w network.Writer, r io.Reader) error
- func WriteBodyFixedSize(w network.Writer, r io.Reader, size int64) error
- func WriteChunk(w network.Writer, b []byte, withFlush bool) (err error)
- func WriteTrailer(t *protocol.Trailer, w network.Writer) error
- type HeaderScanner
- type HeaderValueScanner
Constants ¶
This section is empty.
Variables ¶
View Source
var NoBody = protocol.NoBody
Deprecated: Use github.com/cloudwego/hertz/pkg/protocol.NoBody instead.
Functions ¶
func AcquireBodyStream ¶
func AcquireBodyStream(b *bytebufferpool.ByteBuffer, r network.Reader, t *protocol.Trailer, contentLength int) io.Reader
func BufferSnippet ¶
func HasHeaderValue ¶
func LimitedReaderSize ¶
func MustDiscard ¶
func MustPeekBuffered ¶
func ReadBodyWithStreaming ¶
func ReleaseBodyStream ¶
ReleaseBodyStream releases the body stream. Error of skipRest may be returned if there is one.
NOTE: Be careful to use this method unless you know what it's for.
func SkipTrailer ¶ added in v0.6.0
func WriteChunk ¶ added in v0.6.0
Types ¶
type HeaderScanner ¶
type HeaderScanner struct { B []byte Key []byte Value []byte Err error // HLen stores header subslice len HLen int DisableNormalizing bool // contains filtered or unexported fields }
func (*HeaderScanner) Next ¶
func (s *HeaderScanner) Next() bool
type HeaderValueScanner ¶
Click to show internal directories.
Click to hide internal directories.