func newRsvp(i, vrnd uint64, vval string) Msg { m := make(Msg, baseLen+rsvpLen+len(vval)) m[mCmd] = rsvp util.Packui64(m.Body()[0:8], i) util.Packui64(m.Body()[8:16], vrnd) copy(m.Body()[rsvpLen:], []byte(vval)) return m }
func newNominate(crnd uint64, v string) Msg { m := make(Msg, baseLen+nominateLen+len(v)) m[mCmd] = nominate util.Packui64(m.Body()[0:8], crnd) copy(m.Body()[nominateLen:], []byte(v)) return m }
func newVote(i uint64, vval string) Msg { m := make(Msg, baseLen+voteLen+len(vval)) m[mCmd] = vote util.Packui64(m.Body()[0:8], i) copy(m.Body()[voteLen:], []byte(vval)) return m }
func newInvite(crnd uint64) Msg { m := make(Msg, baseLen+inviteLen) m[mCmd] = invite util.Packui64(m.Body()[0:8], crnd) return m }
// Typically used just before writing `m` to the network. func (m Msg) SetSeqn(seqn uint64) { util.Packui64(m[mSeqn:mSeqn+8], seqn) }