Documentation
¶
Index ¶
- func Factory() *pack_factory
- func NewDataPack() ziface.IDataPack
- func NewDataPackLtv() ziface.IDataPack
- type DataPack
- type DataPackLtv
- type Message
- func (msg *Message) GetData() []byte
- func (msg *Message) GetDataLen() uint32
- func (msg *Message) GetMsgID() uint32
- func (msg *Message) GetRawData() []byte
- func (msg *Message) Init(ID uint32, data []byte)
- func (msg *Message) SetData(data []byte)
- func (msg *Message) SetDataLen(len uint32)
- func (msg *Message) SetMsgID(msgID uint32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataPackLtv ¶ added in v1.1.17
NewDataPack 封包拆包实例初始化方法
Types ¶
type DataPack ¶
type DataPack struct{}
DataPack 封包拆包类实例,暂时不需要成员
type DataPackLtv ¶ added in v1.1.17
type DataPackLtv struct{}
DataPackLtv Zinx早期使用的LTV 小端方式,兼容之前的应用
func (*DataPackLtv) GetHeadLen ¶ added in v1.1.17
func (dp *DataPackLtv) GetHeadLen() uint32
GetHeadLen 获取包头长度方法
type Message ¶
type Message struct {
DataLen uint32 //消息的长度
ID uint32 //消息的ID
Data []byte //消息的内容
// contains filtered or unexported fields
}
Message 消息
func NewMessage ¶ added in v1.1.6
func NewMessageByMsgId ¶ added in v1.1.6
func NewMsgPackage ¶
NewMsgPackage 创建一个Message消息包
Click to show internal directories.
Click to hide internal directories.