Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadPacketHeader ¶
Reads a packet header (length, version) from the given Reader.
func WritePacket ¶
func WritePacket(p EncodablePacket, w io.Writer) error
Write a packet to the given Writer.
Types ¶
type DecodablePacket ¶
Packet which is able to be decoded.
type EncodablePacket ¶
Packet which is able to be encoded.
type HandshakePacket ¶
type HandshakePacket struct { ProtoVer enc.VarInt ServerAddr enc.String ServerPort enc.UnsignedShort NextState enc.VarInt }
func (HandshakePacket) ID ¶
func (HandshakePacket) ID() enc.VarInt
func (HandshakePacket) Marshal ¶
func (h HandshakePacket) Marshal() ([]byte, error)
type RequestPacket ¶
type RequestPacket struct{}
func (RequestPacket) ID ¶
func (RequestPacket) ID() enc.VarInt
func (RequestPacket) Marshal ¶
func (h RequestPacket) Marshal() ([]byte, error)
type ResponsePacket ¶
func (ResponsePacket) ID ¶
func (ResponsePacket) ID() enc.VarInt
Click to show internal directories.
Click to hide internal directories.