socket

package
v0.0.0-...-abfa450 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	net.Conn
	Reader       *stream.ProtocolReader
	Username     string
	UUID         uuid.UUID
	Compression  bool
	KeepAlive    int
	PacketsQueue chan protocol.PacketOut

	ProxyData []string

	State        types.State
	Protocol     int32
	Disconnected bool
	// contains filtered or unexported fields
}

func NewConn

func NewConn(conn net.Conn) *Conn

func (*Conn) Active

func (c *Conn) Active() bool

func (*Conn) Disconnect

func (c *Conn) Disconnect(message component.IChatComponent)

func (*Conn) HandlePacket

func (c *Conn) HandlePacket(id int, length int, reader *stream.ProtocolReader) (handledPacket protocol.PacketIn, err error)

func (*Conn) WritePacket

func (c *Conn) WritePacket(packetOut protocol.PacketOut) (err error)

Jump to

Keyboard shortcuts

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