WriteShutdown writes a shutdown message to the writer
(w io.Writer)
| 42 | |
| 43 | // WriteShutdown writes a shutdown message to the writer |
| 44 | func WriteShutdown(w io.Writer) error { |
| 45 | return writeByte(w, OpShutdown) |
| 46 | } |
| 47 | |
| 48 | // ReadControlMessage reads a control message from the reader |
| 49 | func ReadControlMessage(r io.Reader) (opcode byte, nonce uint64, err error) { |