watcher

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Host string
	Port int
}

By default Sauerbraten seems to only allow one game server per IP address (or at least hostname) which is a little weird.

func FetchServers

func FetchServers() ([]Address, error)

type Server

type Server struct {
	Info   []byte `cbor:"info"`
	Length int
	// contains filtered or unexported fields
}

type ServerInfo

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

type Servers

type Servers map[Address]Server

type Watcher

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

func NewWatcher

func NewWatcher() *Watcher

func (*Watcher) Get

func (watcher *Watcher) Get() Servers

func (*Watcher) PingServers

func (watcher *Watcher) PingServers()

func (*Watcher) ReceivePings

func (watcher *Watcher) ReceivePings()

func (*Watcher) UpdateServerList

func (watcher *Watcher) UpdateServerList()

func (*Watcher) Watch

func (watcher *Watcher) Watch() error

Jump to

Keyboard shortcuts

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