Help us shape the future of Go! Take the 2026 Go Developer Survey

go-svrquery

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: BSD-2-Clause

README

go-svrquery Go Report Card License GoDoc Build Status

go-svrquery is a Go client for talking to game servers using various query protocols.

Features

Installation

go get -u github.com/multiplay/go-svrquery

Examples

Using go-svrquery is simple just create a client and then send commands e.g.

package main

import (
	"log"
	"time"

	"github.com/multiplay/go-svrquery/lib/svrquery"
)

func main() {
	c, err := svrquery.NewClient("tf2e", "192.168.1.102:10011")
	if err != nil {
		log.Fatal(err)
	}
	defer c.Close()

	r, err := c.Query()
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("%#v\n", r)
}

CLI

A cli is available in https://github.com/multiplay/go-svrquery/tree/master/cmd/cli

This enables you make queries to servers using the specified protocol, and returns the response in pretty json.

Documentation

License

go-svrquery is available under the BSD 2-Clause License.

Directories

Path Synopsis
cmd
cli command
lib
svrquery/common
Package common provides utilities that are common to query protocols such as binary decoding and error handling.
Package common provides utilities that are common to query protocols such as binary decoding and error handling.
svrquery/protocol
Package protocol provides a registry for all known protocols.
Package protocol provides a registry for all known protocols.
svrquery/protocol/all
Package all provides access to all available protocols.
Package all provides access to all available protocols.
svrquery/protocol/sqp
Package sqp provides the protocol implementation for the Unity Server Query Protocol.
Package sqp provides the protocol implementation for the Unity Server Query Protocol.
svrquery/protocol/titanfall
Package titanfall provides the protocol implementation for the titanfall series of games from Respawn.
Package titanfall provides the protocol implementation for the titanfall series of games from Respawn.

Jump to

Keyboard shortcuts

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