goquery

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 12 Imported by: 0

README

goquery

UT3 query protocol client & server in Go

Based on https://github.com/Sandertv/gophertunnel/tree/master/query with bug fixes and server support

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(address string) (information map[string]string, players []string, err error)

Do queries a server at the address passed using the UT3 query protocol. If the server responds, a map containing information is returned. Note that some servers do not support querying, in which case the query will time out. Do will take at most five seconds to try and get the query information.

Types

type QueryServer added in v0.2.0

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

func New

func New(queryInfo map[string]string, players []string) *QueryServer

func (*QueryServer) Close added in v0.2.0

func (q *QueryServer) Close() error

func (*QueryServer) Handle added in v0.2.0

func (q *QueryServer) Handle(buf *bytes.Buffer, addr net.Addr) error

func (*QueryServer) Serve added in v0.2.0

func (q *QueryServer) Serve(addr string) error

func (*QueryServer) SetPlayers added in v0.2.0

func (q *QueryServer) SetPlayers(players []string)

func (*QueryServer) SetQueryInfo added in v0.2.0

func (q *QueryServer) SetQueryInfo(queryInfo map[string]string)

Jump to

Keyboard shortcuts

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