1 Star 0 Fork 19

drama10096/y3-codec-golang

forked from YoMo/y3-codec-golang 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
base_packet.go 546 Bytes
Copy Edit Raw Blame History
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
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/drama10096/y3-codec-golang.git
git@gitee.com:drama10096/y3-codec-golang.git
drama10096
y3-codec-golang
y3-codec-golang
master

Search

23e8dbc6 1850385 7e0993f3 1850385