compat

package
v0.0.1-beta.11 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package compat provide function to workaround autogenerated binding libraries.

  • umid.UMID type, which is aliased uuid.UUD, which in turn is alias for [16]byte. Replace with direct/primative byte slice as input.

  • bytes encode/decode functions, workaround for serveral issues: posbus.Message is interface, after which reflection needs to be used to determine actual message type. And there is a nested map to any/interface{}, which needs to be handled. If external application wants to use their own eventloop (and websocket), instead of the callback mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(msg posbus.Message) ([]byte, error)

func NewHandshake

func NewHandshake(
	token string,
	userID []byte,
	sessionID []byte,
) posbus.HandShake

func NewHighFive

func NewHighFive(from []byte, to []byte, msg string) posbus.HighFive

func NewObjectTransform

func NewObjectTransform(
	id []byte,
	position cmath.Vec3,
	rotation cmath.Vec3,
	scale cmath.Vec3,
) posbus.ObjectTransform

func NewTeleportRequest

func NewTeleportRequest(uuid []byte) posbus.TeleportRequest

Types

type DecodeResult

type DecodeResult struct {
	Type posbus.MsgType
	Data []byte
}

func Decode

func Decode(b []byte) (*DecodeResult, error)

Jump to

Keyboard shortcuts

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