Flush write buffer data to the underlying connection, it assumes header data is the first 8 bytes of buf
()
| 129 | |
| 130 | // Flush write buffer data to the underlying connection, it assumes header data is the first 8 bytes of buf |
| 131 | func (w *streamWriter) Flush() error { |
| 132 | w.h.init(w.recType, w.c.reqID, w.buf.Len()-8) |
| 133 | w.writeHeader() |
| 134 | w.buf.Write(pad[:w.h.PaddingLength]) |
| 135 | _, err := w.buf.WriteTo(w.c.rwc) |
| 136 | return err |
| 137 | } |
| 138 | |
| 139 | // FlushStream flush data then end current stream |
| 140 | func (w *streamWriter) FlushStream() error { |
no test coverage detected