net

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 6 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)

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