Documentation ¶
Index ¶
- Constants
- type AckData
- type BaseMessage
- func (bm *BaseMessage) BasePack(dataBuff *bytes.Buffer) error
- func (bm *BaseMessage) BaseUnpack(dataBuff *bytes.Reader) error
- func (bm *BaseMessage) ReadBytes(dataBuff *bytes.Reader) ([]byte, error)
- func (bm *BaseMessage) ReadString(dataBuff *bytes.Reader) (string, error)
- func (bm *BaseMessage) WriteBytes(buff *bytes.Buffer, data []byte) error
- func (bm *BaseMessage) WriteString(buff *bytes.Buffer, str string) error
- type CommandData
- type ErrorData
- type FileData
- type OkData
Constants ¶
View Source
const ( Heartbeat = iota Login //登录成功后,配置的客户端获取 Command //start,stop,uninstall File OK Online //定时更新数据 ERROR ACK UNKNOWN )
View Source
const ( FlagCompress = iota FlagAutoAck )
View Source
const ( FileTransferError = iota ConmmandError )
View Source
const ( Start = iota + 1 Stop Restart Reload Uninstall )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckData ¶
type AckData struct { BaseMessage Origin uint8 }
type BaseMessage ¶
func (*BaseMessage) BaseUnpack ¶
func (bm *BaseMessage) BaseUnpack(dataBuff *bytes.Reader) error
func (*BaseMessage) ReadBytes ¶
func (bm *BaseMessage) ReadBytes(dataBuff *bytes.Reader) ([]byte, error)
func (*BaseMessage) ReadString ¶
func (bm *BaseMessage) ReadString(dataBuff *bytes.Reader) (string, error)
func (*BaseMessage) WriteBytes ¶
func (bm *BaseMessage) WriteBytes(buff *bytes.Buffer, data []byte) error
func (*BaseMessage) WriteString ¶
func (bm *BaseMessage) WriteString(buff *bytes.Buffer, str string) error
type CommandData ¶
type CommandData struct { BaseMessage Name string Type byte }
func (*CommandData) Pack ¶
func (cmd *CommandData) Pack() ([]byte, error)
func (*CommandData) UnPack ¶
func (cmd *CommandData) UnPack(binaryData []byte) error
type ErrorData ¶
type ErrorData struct { BaseMessage Origin uint8 Data string }
Click to show internal directories.
Click to hide internal directories.