Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AncientResponse ¶
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 LegacyResponse ¶
type LegacyResponse struct { ProtocolVersion uint32 Version string MessageOfTheDay string PlayerCount uint32 MaxPlayers uint32 }
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 description `json:"description"` Favicon string `json:"favicon"` }