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)
| 720 | // It is the caller's responsibility not to violate the maximum frame size |
| 721 | // and to not call other Write methods concurrently. |
| 722 | func (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. |
no test coverage detected