MCPcopy Create free account
hub / github.com/imroc/req / WriteDataPadded

Method WriteDataPadded

internal/http2/frame.go:722–727  ·  view source on GitHub ↗

WriteDataPadded writes a DATA frame with optional padding. If pad is nil, the padding bit is not sent. The length of pad must not exceed 255 bytes. The bytes of pad must all be zero, unless f.AllowIllegalWrites is set. It will perform exactly one Write to the underlying Writer. It is the caller's

(streamID uint32, endStream bool, data, pad []byte)

Source from the content-addressed store, hash-verified

720// It is the caller's responsibility not to violate the maximum frame size
721// and to not call other Write methods concurrently.
722func (h2f *Framer) WriteDataPadded(streamID uint32, endStream bool, data, pad []byte) error {
723 if err := h2f.startWriteDataPadded(streamID, endStream, data, pad); err != nil {
724 return err
725 }
726 return h2f.endWrite()
727}
728
729// startWriteDataPadded is WriteDataPadded, but only writes the frame to the Framer's internal buffer.
730// The caller should call endWrite to flush the frame to the underlying writer.

Callers 1

WriteDataMethod · 0.95

Calls 2

startWriteDataPaddedMethod · 0.95
endWriteMethod · 0.95

Tested by

no test coverage detected