Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) ReadPacket ¶
func (c *Conn) ReadPacket() (packet.Serverbound, error)
ReadPacket will attempt to read and decode a serverbound packet from this connection. This method will block until either the connection is closed, in which case this method will return an error, or until a serverbound packet is received. If the packet is malformed or contains invalid values, then a respective error that is describing the issue is returned. A packet is considered as containing invalid values if the packet definition implements the packet.Validator interface and the validation fails.
func (*Conn) TransitionTo ¶
TransitionTo sets the phase of this connection to the given phase. This method will panic if the transition is invalid.
func (*Conn) WritePacket ¶
func (c *Conn) WritePacket(p packet.Clientbound) error
WritePacket writes the given clientbound packet to the client, returning any error if any returns.