refactor: message entity

This commit is contained in:
liwei committed 2020-04-23 09:56:17 +08:00
1 parent 1d2f38d7ae
commit d6d411f48c
12 files changed
+167 -151

No files matched your search

+8 -4
View File
@@ -1,12 +1,16 @@
package message
// keep-alive: <len=0000>
type Keepalive struct{}
type Keepalive struct {
*base
}
var data = make([]byte, 4)
func (k *Keepalive) Encode() []byte {
return []byte{0, 0, 0, 0}
return data
}
func (k *Keepalive) Decode(buf []byte) Serialize {
return &Keepalive{}
func (k *Keepalive) Decode(body []byte) {
}