udpclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REGISTRATION_RESULT = 1
	REALTIME_UPDATE     = 2
	REALTIME_CAR_UPDATE = 3
)

Variables

This section is empty.

Functions

func Disconnect

func Disconnect(conn *net.UDPConn) error

func RequestConnection

func RequestConnection(conn *net.UDPConn, displayName, connectionPassword, commandPassword string, msUpdateInterval int32) error

func RunClient

func RunClient(errCh chan error)

Types

type CarUpdate

type CarUpdate struct {
	CarIndex    uint16
	DriverIndex uint16
	DriverCount uint8
	Gear        int8
	WorldPosX   float32
	WorldPosY   float32
	Yaw         float32
	CarLocation uint8
	Kmh         uint16
}

func HandleCarUpdate

func HandleCarUpdate(b []byte) CarUpdate

type RegistrationResult

type RegistrationResult struct {
	ConnectionID int32
	Success      bool
	IsReadOnly   bool
	ErrMessage   string
}

func HandleRegistrationResult

func HandleRegistrationResult(b []byte) RegistrationResult

Jump to

Keyboard shortcuts

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