net

package
v0.0.0-...-55cdb59 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const MTU = 1500
View Source
const ProtocolVersionCode = 756
View Source
const ProtocolVersionName = "1.17.1"

Variables

View Source
var HandshakeClientboundIds = map[int32]Type{}
View Source
var HandshakeServerboundIds = map[int32]Type{
	0x00: TypeOf(ServerboundHandshakePacket{}),
	0xFE: TypeOf(ServerboundHandshakeLegacyPingPacket{}),
}
View Source
var LoginClientboundIds = map[int32]Type{
	0x00: TypeOf(ClientboundLoginDisconnectPacket{}),
	0x01: TypeOf(ClientboundLoginEncryptionRequest{}),
	0x02: TypeOf(ClientboundLoginSuccess{}),
	0x03: TypeOf(ClientboundLoginCompressionPacket{}),
	0x04: TypeOf(ClientboundLoginPluginRequest{}),
}
View Source
var LoginServerboundIds = map[int32]Type{
	0x00: TypeOf(ServerboundLoginStartPacket{}),
	0x01: TypeOf(ServerboundLoginEncryptionResponsePacket{}),
	0x02: TypeOf(ServerboundLoginPluginResponsePacket{}),
}
View Source
var PlayClientboundIds = map[int32]Type{}
View Source
var PlayServerboundIds = map[int32]Type{}
View Source
var StatusClientboundIds = map[int32]Type{
	0x00: TypeOf(ClientboundStatusResponsePacket{}),
	0x01: TypeOf(ClientboundStatusPongPacket{}),
}
View Source
var StatusServerboundIds = map[int32]Type{
	0x00: TypeOf(ServerboundStatusRequestPacket{}),
	0x01: TypeOf(ServerboundStatusPingPacket{}),
}

Functions

This section is empty.

Types

type JavaClient

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

func (*JavaClient) Send

func (c *JavaClient) Send(pkt Packet) error

type JavaServer

type JavaServer struct {
	RDB *redis.Client

	Clients map[uuid.UUID]*JavaClient
	// contains filtered or unexported fields
}

func (*JavaServer) Bootstrap

func (s *JavaServer) Bootstrap(rdb *redis.Client, address string, port int, onlineMode bool) error

func (*JavaServer) GetClient

func (s *JavaServer) GetClient(networkId []byte) (*JavaClient, error)

type Packet

type Packet interface{}

type Protocol

type Protocol int
const (
	Handshake Protocol = iota
	Status
	Login
	Play
)

func (Protocol) String

func (p Protocol) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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