Documentation ¶ Index ¶ func Encode(key []byte, m Message) (b []byte, err error) func Send(c *comm.Comm, key []byte, m Message) (err error) type Message func Decode(key []byte, b []byte) (m Message, err error) func (m Message) String() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Encode ¶ func Encode(key []byte, m Message) (b []byte, err error) Encode will convert to bytes func Send ¶ func Send(c *comm.Comm, key []byte, m Message) (err error) Send will send out Types ¶ type Message ¶ type Message struct { Type string `json:"t,omitempty"` Message string `json:"m,omitempty"` Bytes []byte `json:"b,omitempty"` Bytes2 []byte `json:"b2,omitempty"` Num int `json:"n,omitempty"` } Message is the possible payload for messaging func Decode ¶ func Decode(key []byte, b []byte) (m Message, err error) Decode will convert from bytes func (Message) String ¶ func (m Message) String() string Source Files ¶ View all Source files message.go Click to show internal directories. Click to hide internal directories.