EncodeResult writes the result code to the output writer.
(result ResponseCode, w io.Writer)
| 99 | |
| 100 | // EncodeResult writes the result code to the output writer. |
| 101 | func EncodeResult(result ResponseCode, w io.Writer) error { |
| 102 | _, err := w.Write([]byte{uint8(result)}) |
| 103 | return err |
| 104 | } |
| 105 | |
| 106 | // EncodeChunk reads (decompressed) response message from the msg io.Reader, |
| 107 | // and writes it as a chunk with given result code to the output writer. The compression is optional and may be nil. |
no test coverage detected