7 Star 38 Fork 19

YoMo / y3-codec-golang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
base_packet.go 546 Bytes
一键复制 编辑 原始数据 按行查看 历史
package y3
import (
"github.com/yomorun/y3-codec-golang/internal/mark"
"github.com/yomorun/y3-codec-golang/internal/utils"
)
// basePacket is the base type of the NodePacket and PrimitivePacket
type basePacket struct {
tag *mark.Tag
length uint32
valBuf []byte
}
func (bp *basePacket) Length() uint32 {
return bp.length
}
func (bp *basePacket) SeqID() byte {
return bp.tag.SeqID()
}
// isNodePacket determines if the packet is NodePacket or PrimitivePacket
func isNodePacket(flag byte) bool {
return flag&utils.MSB == utils.MSB
}
Go
1
https://gitee.com/yomorun/y3-codec-golang.git
git@gitee.com:yomorun/y3-codec-golang.git
yomorun
y3-codec-golang
y3-codec-golang
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891