Documentation ¶
Overview ¶
Package ping is used for reading and sending data regarding handshaking, pinging and connecting. It follows the Minecraft protocol version 5.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayMessage ¶
DisplayMessage responds with a disconnect message to the player when they attempt to connect to the server.
func HandlePingPacket ¶
HandlePingPacket handles a ping packet used by the Minecraft client used to measure the round trip time of the connection.
Types ¶
type HandshakePacket ¶
type HandshakePacket struct { ProtocolNumber int ServerAddress string ServerPort uint16 NextState int }
HandshakePacket contains the decoded data from a handshake packet. See ReadHandshakePacket.
func ReadHandshakePacket ¶
func ReadHandshakePacket(s protocol.Stream) (HandshakePacket, error)
ReadHandshakePacket reads a handshake packet (packet ID 0) and decodes it.
type Status ¶
type Status struct { OnlinePlayers int MaxPlayers int Message string ShowConnection bool // ProtocolNumber is the internal protocol version number to respond with // that can be found at http://wiki.vg/Protocol_version_numbers ProtocolNumber int }
Status is the container for the information to respond with on the Minecraft server list menu.
Click to show internal directories.
Click to hide internal directories.