echovr

package module
v0.0.0-...-83a0ae1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PACKET_HEADER uint64 = 0xBB8CE7A278BB40F6
View Source
var SymbolSeed = GenerateSymbolSeed()

Functions

func Deserialize

func Deserialize(obj Serializable, b []byte) error

func GenerateSymbol

func GenerateSymbol(name string) uint64

func GenerateSymbolSeed

func GenerateSymbolSeed() [0x100]uint64

func RunErrorFunctions

func RunErrorFunctions(funcs []func() error) error

func Serialize

func Serialize(obj Serializable) ([]byte, error)

func SerializeMessages

func SerializeMessages(messages []Message) ([]byte, error)

func SerializePackets

func SerializePackets(packets []Packet) ([]byte, error)

func StringifyStruct

func StringifyStruct(s interface{}) string

Types

type EasyStream

type EasyStream struct {
	Mode int // 0 = read, 1 = write
	// contains filtered or unexported fields
}

func NewEasyStream

func NewEasyStream(mode int, b []byte) *EasyStream

func (*EasyStream) Bytes

func (s *EasyStream) Bytes() []byte

func (*EasyStream) Len

func (s *EasyStream) Len() int

func (*EasyStream) Position

func (s *EasyStream) Position() int

func (*EasyStream) SetPosition

func (s *EasyStream) SetPosition(pos int) error

func (*EasyStream) StreamByte

func (s *EasyStream) StreamByte(value *byte) error

func (*EasyStream) StreamBytes

func (s *EasyStream) StreamBytes(data *[]byte, length int) error

func (*EasyStream) StreamJson

func (s *EasyStream) StreamJson(data interface{}) error

func (*EasyStream) StreamNullTerminatedJson

func (s *EasyStream) StreamNullTerminatedJson(data interface{}) error

func (*EasyStream) StreamNullTerminatedString

func (s *EasyStream) StreamNullTerminatedString(value *string) error

func (*EasyStream) StreamNumber

func (s *EasyStream) StreamNumber(order binary.ByteOrder, value any) error

func (*EasyStream) StreamString

func (s *EasyStream) StreamString(value *string) error

func (*EasyStream) StreamStringTable

func (s *EasyStream) StreamStringTable(strings *[]string) error

func (*EasyStream) StreamStruct

func (s *EasyStream) StreamStruct(obj Serializable) error

func (*EasyStream) StreamZlibCompressedBytes

func (s *EasyStream) StreamZlibCompressedBytes(data *[]byte) error

func (*EasyStream) StreamZlibEasyStream

func (s *EasyStream) StreamZlibEasyStream(stream func(s *EasyStream) error) error

func (*EasyStream) StreamZstdCompressedBytes

func (s *EasyStream) StreamZstdCompressedBytes(data *[]byte) error

func (*EasyStream) StreamZstdEasyStream

func (s *EasyStream) StreamZstdEasyStream(stream func(s *EasyStream) error) error

type LoginSession

type LoginSession struct {
	AccountID uint64 `json:"accountid"`
	Session   uint64 `json:"session"`
}

func (*LoginSession) Stream

func (m *LoginSession) Stream(s *EasyStream) error

type MatchingSession

type MatchingSession struct {
	AccountID uint64 `json:"accountid"`
	Session   uint64 `json:"session"`
}

func (*MatchingSession) Stream

func (m *MatchingSession) Stream(s *EasyStream) error

type Message

type Message interface {
	Symbol() uint64
	Stream(s *EasyStream) error
}

type Packet

type Packet struct {
	Header uint64
	Symbol uint64
	Data   []byte
}

func DeserializePackets

func DeserializePackets(b []byte) ([]Packet, error)

func (*Packet) Stream

func (p *Packet) Stream(s *EasyStream) error

type Serializable

type Serializable interface {
	Stream(s *EasyStream) error
}

type SessionUUID

type SessionUUID struct {
	ServerID uint64 `json:"serverid"`
	Session  uint64 `json:"session"`
}

func (*SessionUUID) Stream

func (m *SessionUUID) Stream(s *EasyStream) error

type XPlatformID

type XPlatformID struct {
	PlatformCode uint64 `json:"platform"`
	AccountID    uint64 `json:"id"`
}

func (*XPlatformID) Stream

func (m *XPlatformID) Stream(s *EasyStream) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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