Documentation ¶
Index ¶
Constants ¶
View Source
const ( PacketLogin PacketType = 3 PacketCommand PacketType = 2 PacketResponse PacketType = 0 RequestIDStart int32 = 6516583 PacketChunkLength int = 4096 )
Variables ¶
View Source
var ( MCEndian binary.ByteOrder = binary.LittleEndian InvalidPassword error = errors.New("invalid RCON password") )
Functions ¶
This section is empty.
Types ¶
type Packet ¶
type Packet struct { RequestID int32 Type PacketType Data string }
type PacketType ¶
type PacketType int32
type RCONClient ¶
func NewRCONClient ¶
func NewRCONClient(host string, port uint16) *RCONClient
func (*RCONClient) Close ¶
func (client *RCONClient) Close() error
func (*RCONClient) Login ¶
func (client *RCONClient) Login(password string) error
func (*RCONClient) RecvPacket ¶
func (client *RCONClient) RecvPacket() (*Packet, error)
func (*RCONClient) SendCommand ¶
func (client *RCONClient) SendCommand(command string) (string, error)
func (*RCONClient) SendPacket ¶
func (client *RCONClient) SendPacket(packet Packet) error
Click to show internal directories.
Click to hide internal directories.