data

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package data implements the SRS data client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataClient

type DataClient interface {
	// Name returns the name of the client as it appears in the SRS client list and in in-game transmissions.
	Name() string
	// Run starts the SRS data client. It should be called exactly once. The given channel will be closed when the client is ready.
	Run(context.Context, *sync.WaitGroup, chan<- any) error
	// Send sends a message to the SRS server.
	Send(types.Message) error
	// IsOnFrequency checks if the named unit is on the client's frequency.
	IsOnFrequency(string) bool
	// ClientsOnFrequency returns the number of peers on this client's frequency.
	ClientsOnFrequency() int
}

DataClient is a client for the SRS data protocol.

func NewClient

func NewClient(guid types.GUID, config types.ClientConfiguration) (DataClient, error)

Jump to

Keyboard shortcuts

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