func (kvmsg *Kvmsg) Send(socket *zmq.Socket) (err error) {
	kvmsg.encode_props()
	_, err = socket.SendMessage(kvmsg.frame)
	return
}
Send key-value message to socket; any empty frames are sent as such.
package kvmsg
import (
	zmq "github.com/pebbe/zmq4"
	"github.com/google/uuid"
	"errors"
	"fmt"
	"os"
	"strings"
)
const (
	frame_KEY    = 0
	frame_SEQ    = 1
	frame_UUID   = 2
	frame_PROPS  = 3
	frame_BODY   = 4
	kvmsg_FRAMES = 5
)
type Kvmsg struct {
	present []bool
	frame []string
	props []string
}
func (kvmsg *Kvmsg) encode_props() {
	kvmsg.frame[frame_PROPS] = strings.Join(kvmsg.props, "\n") + "\n"
	kvmsg.present[frame_PROPS] = true
}
func (kvmsg *Kvmsg) decode_props() {
	kvmsg.props = strings.Split(kvmsg.frame[frame_PROPS], "\n")
	if ln := len(kvmsg.props); ln > 0 && kvmsg.props[ln-1] == "" {
		kvmsg.props = kvmsg.props[:ln-1]
	}
}
func NewKvmsg(sequence int64) (kvmsg *Kvmsg) {
	kvmsg = &Kvmsg{
		present: make([]bool, kvmsg_FRAMES),
		frame:   make([]string, kvmsg_FRAMES),
		props:   make([]string, 0),
	}
	kvmsg.SetSequence(sequence)
	return
}
func RecvKvmsg(socket *zmq.Socket) (kvmsg *Kvmsg, err error) {
	kvmsg = &Kvmsg{
		present: make([]bool, kvmsg_FRAMES),
		frame:   make([]string, kvmsg_FRAMES),
	}
	msg, err := socket.RecvMessage(0)
	if err != nil {
		return
	}
	for i := 0; i < kvmsg_FRAMES && i < len(msg); i++ {
		kvmsg.frame[i] = msg[i]
		kvmsg.present[i] = true
	}
	kvmsg.decode_props()
	return
}