Documentation
¶
Overview ¶
Package bedrockping is a simple library to ping Minecraft Bedrock/MCPE servers.
Index ¶
Constants ¶
const (
// DefaultPort is the default Minecraft Bedrock/MCPE server port.
DefaultPort = 19132
)
Variables ¶
This section is empty.
Functions ¶
func ReadUTFString ¶
ReadUTFString reads a UTF-8 string with a uint16 length header.
func ReadUnconnectedPong ¶
ReadUnconnectedPong reads the 'Unconnected Pong (0x1C)' packet from a connection into a Response struct. Details on the packet structure can be found: https://github.com/NiclasOlofsson/MiNET/blob/5bcfbfd94cff943f31208eb8614b3ff16269fdc7/src/MiNET/MiNET/Net/MCPE%20Protocol.cs#L1154
func WriteUnconnectedPing ¶
WriteUnconnectedPing writes the 'Unconnected Ping (0x01)' packet to a writer. Details on the packet structure can be found: https://github.com/NiclasOlofsson/MiNET/blob/5bcfbfd94cff943f31208eb8614b3ff16269fdc7/src/MiNET/MiNET/Net/MCPE%20Protocol.cs#L1003
Types ¶
type Response ¶
type Response struct { Timestamp uint64 `json:"timestamp"` ServerID uint64 `json:"serverId"` GameID string `json:"gameId"` ServerName string `json:"serverName"` ProtocolVersion int `json:"protocolVersion"` MCPEVersion string `json:"mcpeVersion"` PlayerCount int `json:"playerCount"` MaxPlayers int `json:"maxPlayers"` Extra []string `json:"extra"` }
Response data returned from ReadUnconnectedPong.