Documentation
¶
Index ¶
Constants ¶
View Source
const (
RPCVERSION string = "1.2"
)
Variables ¶
This section is empty.
Functions ¶
func RpcCreateMessage ¶
func RpcCreateMessage(msg interface{}) []byte
func RpcSendMessage ¶
Types ¶
type RpcCommandResponse ¶
type RpcCommandStart ¶
type RpcCommandStatus ¶
type RpcCommandStatus struct {
Version string `json:"version"`
}
type RpcCommandStop ¶
type RpcCommandStop struct {
Version string `json:"version"`
}
type RpcCommandType ¶
type RpcCommandType uint16
const ( RPCCOMMANDUNKNOWN RpcCommandType = 0 RPCCOMMANDSTART RpcCommandType = 1 RPCCOMMANDSTOP RpcCommandType = 2 RPCCOMMANDSTATUS RpcCommandType = 3 RPCCOMMANDRESPONSE RpcCommandType = 4 )
func RpcReadPacket ¶
func RpcReadPacket(client net.Conn) (c RpcCommandType, ret []byte, err error)
Parse message header, get message type and content length
Click to show internal directories.
Click to hide internal directories.