示例#1
0
// Returns the info for `m`. If `m` is not an invite, the result is undefined.
func inviteParts(m Msg) (crnd uint64) {
	return util.Unpackui64(m.Body())
}
示例#2
0
func (m Msg) Seqn() uint64 {
	return util.Unpackui64(m[mSeqn : mSeqn+8])
}
示例#3
0
// Returns the info for `m`. If `m` is not an rsvp, the result is undefined.
func rsvpParts(m Msg) (i, vrnd uint64, vval string) {
	i = util.Unpackui64(m.Body()[0:8])
	vrnd = util.Unpackui64(m.Body()[8:16])
	vval = string(m.Body()[16:])
	return
}
示例#4
0
// Returns the info for `m`. If `m` is not a vote, the result is undefined.
func voteParts(m Msg) (i uint64, vval string) {
	i = util.Unpackui64(m.Body()[0:8])
	vval = string(m.Body()[8:])
	return
}
示例#5
0
// Returns the info for `m`. If `m` is not a nominate, the result is undefined.
func nominateParts(m Msg) (crnd uint64, v string) {
	crnd = util.Unpackui64(m.Body()[0:8])
	v = string(m.Body()[8:])
	return
}