packet

package
v0.0.0-...-ed75f63 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decodeable

type Decodeable interface {
	ID() int32
	Decode(encoding.Reader) error
}

Decodeable is a serverbound packet

type EmptyPacket

type EmptyPacket struct {
}

func (EmptyPacket) Decode

func (pk EmptyPacket) Decode(encoding.Reader) error

func (EmptyPacket) Encode

func (pk EmptyPacket) Encode(encoding.Writer) error

type Encodeable

type Encodeable interface {
	ID() int32
	Encode(encoding.Writer) error
}

Encodeable is a clientbound packet

type Error

type Error struct {
	Error error
}

Error is a dummy decodeable packet that is simply an error

func (Error) Decode

func (Error) Decode(encoding.Reader) error

func (Error) ID

func (Error) ID() int32

type UnknownPacket

type UnknownPacket struct {
	Id      int32
	Length  int32
	Payload encoding.Reader
}

func (UnknownPacket) Decode

func (u UnknownPacket) Decode(encoding.Reader) error

func (UnknownPacket) Encode

func (u UnknownPacket) Encode(encoding.Writer) error

func (UnknownPacket) ID

func (u UnknownPacket) ID() int32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳