Documentation
¶
Index ¶
Constants ¶
View Source
const ( ServerDataAuth = PacketType(3) // Authentication packet ServerDataAuthResponse = PacketType(2) // Authentication response packet ServerDataExecCommand = PacketType(2) // Command packet ServerDataResponseValue = PacketType(0) // Response packet )
View Source
const (
DefaultPort = 27015
)
View Source
const MaxPacketSize = 4096
Variables ¶
This section is empty.
Functions ¶
func EncodePacket ¶
EncodePacket convert the packet to a binary representation expected by the RCON protocol, it will return an error if the packet exceeds the maximum packet size.
if you need to send a lot of data you should send multiple packets https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Multiple-packet_Responses
Types ¶
type Packet ¶
type Packet struct { Size int32 ID int32 Type PacketType Body string }
Packet represents an RCON packet
type PacketType ¶
type PacketType int32
PacketType represents an RCON packet type
func (PacketType) Stringer ¶
func (p PacketType) Stringer() string
type RCON ¶
type RCON struct {
// contains filtered or unexported fields
}
func (*RCON) CloseOnProgramEnd ¶
func (server *RCON) CloseOnProgramEnd()
func (*RCON) ListenAndServe ¶
func (*RCON) SetBanList ¶
Click to show internal directories.
Click to hide internal directories.