net

package
v0.0.0-...-ca5e079 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutOfBandHeader  = "\xff\xff\xff\xff"
	GetInfoCommand   = "getinfo"
	GetStatusCommand = "getstatus"
)

Variables

This section is empty.

Functions

func GetInfo

func GetInfo(addr string) (map[string]string, error)

func SendCommand

func SendCommand(addr, cmd string) ([]byte, error)

func SendCommandWithTimeout

func SendCommandWithTimeout(addr, cmd string, timeout time.Duration) ([]byte, error)

func SendServerCommand

func SendServerCommand(addr, password, cmd string) ([]byte, error)

Types

type Player

type Player struct {
	Name  string
	Ping  int
	Score int
}

type StatusResponse

type StatusResponse struct {
	Configuration map[string]string
	Players       []Player
}

func GetStatus

func GetStatus(addr string) (*StatusResponse, error)

Jump to

Keyboard shortcuts

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