StreamChunk reads (decompressed) response message from the msg io.Reader, and writes it as a chunk with given result code to the output writer. The compression is optional and may be nil.
(result ResponseCode, size uint64, r io.Reader, w io.Writer, comp Compression)
| 115 | // StreamChunk reads (decompressed) response message from the msg io.Reader, |
| 116 | // and writes it as a chunk with given result code to the output writer. The compression is optional and may be nil. |
| 117 | func StreamChunk(result ResponseCode, size uint64, r io.Reader, w io.Writer, comp Compression) error { |
| 118 | if err := EncodeResult(result, w); err != nil { |
| 119 | return err |
| 120 | } |
| 121 | return StreamHeaderAndPayload(size, r, w, comp) |
| 122 | } |
no test coverage detected