darkstar

package module
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 4 Imported by: 0

README

Darkstar-query-go

Replicates the functionality in Starsiege to query Master Servers and Game Servers

Designed to report back JSON

There are likely better and more idiomatic ways of approaching this in golang, I'm just doing the best I can

TODO:

Documentation - currently this project has a minimal amount of documentation, but this will change in future revisions

Work out necessary technique to read the compressed GameInfoResponse packet

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	*protocol.Options
	Addresses []string
}

func NewQuery

func NewQuery(timeout time.Duration, debug bool) *Query

func (*Query) Masters

func (q *Query) Masters() (output []*query.MasterQuery, games map[string]*server.Server, errorArray []error)

func (*Query) Servers

func (q *Query) Servers() (output []*query.PingInfoQuery, errors []error)

type Results

type Results struct {
	Masters []*query.MasterQuery
	Games   []*query.PingInfoQuery
	Errors  []error
}

type ServerResult

type ServerResult struct {
	Master *query.MasterQuery
	Game   *query.PingInfoQuery
	Error  error
}

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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