Documentation ¶
Index ¶
Constants ¶
View Source
const (
RPCVERSION string = "1.3"
)
Variables ¶
This section is empty.
Functions ¶
func RpcCreateMessage ¶
func RpcCreateMessage(msg interface{}) []byte
func RpcSendMessage ¶
Types ¶
type RpcCommandResponse ¶
type RpcCommandResponse struct { Version string `json:"version"` Status string `json:"status"` AccessId int `json:"accessid"` IsConnected bool `json:"isconnected"` IsRunning bool `json:"isrunning"` Uri string `json:"uri"` RestrictedNetwork bool `json:"restrictednetwork"` TunnelExists bool `json:"tunnelexists"` }
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.