func writeMsgData(w io.Writer, h Header, p []byte) error {
    if err := writeUint8(w, byte(h)); err != nil {
        return err
    } else if err := len4(len(p)).writeTo(w); err != nil {
        return err
    } else if _, err := w.Write(p); err != nil {
        return err
    } 
    return nil
}
// Helper function for writing msg

Helper function for writing msg
// Helper function for writing msg
func writeMsgData(w io.Writer, h Header, p []byte) error {
    if err := writeUint8(w, byte(h)); err != nil {
        return err
    } else if err := len4(len(p)).writeTo(w); err != nil {
        return err
    } else if _, err := w.Write(p); err != nil {
        return err
    } 
    return nil
}
func writeMsgData ( w io . Writer , h Header , p [ ] byte ) error { if err := writeUint8 ( w , byte ( h ) ) ; err != nil { return err } else if err := len4 ( len ( p ) ) . writeTo ( w ) ; err != nil { return err } else if _ , err := w . Write ( p ) ; err != nil { return err } return nil }
Helper function for writing msg
Helper function for writing msg