Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultHeadLength = 4 DefaultProtocolVersion = 0x01 // test protocol version Ping = 0x00 Send = 0x01 Push = 0x02 )
default custom protocol const
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MsgProtocol ¶
MsgProtocol : custom protocol custom protocol header contains Version, ActionType and DataLength fields its payload is Data field
func NewMsgProtocol ¶
func NewMsgProtocol(msgType uint8) *MsgProtocol
func NewMsgProtocolByBytes ¶
func NewMsgProtocolByBytes(data []byte) (*MsgProtocol, error)
func (*MsgProtocol) Bytes ¶
func (cc *MsgProtocol) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.