Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeMessage ¶ added in v1.0.1
EncodeMessage serializes an RCON command. Format: [4-byte message size | 4-byte message ID | 4-byte message type | variable length message | 2-byte terminator].
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages a connection to a Minecraft server.
func (*Client) Authenticate ¶
Authenticate starts a logged-in RCON session.
type Message ¶ added in v1.0.1
type Message struct { Length int32 ID int32 Type MessageType Body string }
Message contains fields for RCON messages.
func DecodeMessage ¶ added in v1.0.1
DecodeMessage deserialize an RCON response. Format: [4-byte message size | 4-byte message ID | 4-byte message type | variable length message].
type MessageType ¶ added in v1.0.1
type MessageType int32
MessageType is an int32 representing the type of message being sent or received.
const ( // MsgResponse is returned by the server. MsgResponse MessageType = iota // MsgCommand is used when sending commands to the server. MsgCommand // MsgAuthenticate is used when logging into the server. MsgAuthenticate )
Click to show internal directories.
Click to hide internal directories.