proto

package
v0.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(
	r io.Reader,
	direction proto.Direction,
	log logr.Logger,
) *Decoder

func (*Decoder) Decode

func (d *Decoder) Decode() (*proto.PacketContext, error)

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(w io.Writer, direction proto.Direction, log logr.Logger) *Encoder
type Header struct {
	PacketID        uint32
	SenderSubClient byte
	TargetSubClient byte
}

Header is the header of a packet containing a one varuint32 which is composed of a packet id, a sender and target sub client id. These ids are used for split screen functionality.

func (*Header) Decode

func (h *Header) Decode(_ *proto.PacketContext, rd io.Reader) error

func (*Header) Encode

func (h *Header) Encode(_ *proto.PacketContext, wr io.Writer) error

type PacketMeta

type PacketMeta struct {
	Header Header
	proto.PacketContext
}

PacketMeta is a Bedrock edition packet.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL