Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AncientResponse ¶
AncientResponse represents ping response from old servers (Beta 1.8 to 1.3) Minecraft servers.
func PingAncient ¶
func PingAncient(host string, port uint16) (*AncientResponse, error)
PingAncient performs a Server List Ping interaction with old (Beta 1.8 to 1.3) Minecraft server running on the specified host and the specified port.
func PingAncientWithTimeout ¶
func PingAncientWithTimeout(host string, port uint16, timeout time.Duration) (*AncientResponse, error)
PingAncientWithTimeout performs a Server List Ping interaction with old (Beta 1.8 to 1.3) Minecraft server running on the specified host and the specified port with read and write timeout.
type Chat ¶ added in v1.1.0
type Chat interface{}
Chat represents arbitrary JSON-encoded chat components structure used in modern (1.7 and earlier) Minecraft server descriptions.
type LegacyResponse ¶
type LegacyResponse struct { ProtocolVersion uint32 Version string MessageOfTheDay string PlayerCount uint32 MaxPlayers uint32 }
LegacyResponse represents ping response from legacy (1.4 to 1.6) Minecraft servers.
func PingLegacy ¶
func PingLegacy(host string, port uint16) (*LegacyResponse, error)
PingLegacy performs a Server List Ping interaction with legacy (1.4 to 1.6) Minecraft server running on the specified host and the specified port.
func PingLegacyWithTimeout ¶
func PingLegacyWithTimeout(host string, port uint16, timeout time.Duration) (*LegacyResponse, error)
PingLegacyWithTimeout performs a Server List Ping interaction with legacy (1.4 to 1.6) Minecraft server running on the specified host and the specified port with read and write timeout.
type Response ¶
type Response struct { Version struct { Name string `json:"name"` Protocol int `json:"protocol"` } `json:"version"` Players struct { Max int `json:"max"` Online int `json:"online"` Sample []struct { Name string `json:"name"` ID string `json:"id"` } `json:"sample"` } Description Chat `json:"description"` Favicon string `json:"favicon"` }
Response represents ping response from modern (1.7 and earlier) Minecraft servers.