server

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameInfo added in v1.2.0

type GameInfo struct {
	Hostname string
}

type PingInfo

type PingInfo struct {
	protocol.Packet
	GameMode    byte          `csv:"_"` // ??
	GameName    string        `csv:"_"` // es3a
	GameVersion string        `csv:"_"` // V 001.000r
	GameStatus  StatusByte    `csv:"status"`
	PlayerCount byte          `csv:"cur_players"`
	MaxPlayers  byte          `csv:"max_players"`
	Name        string        `csv:"server_name"`
	Address     string        `csv:"server_address"`
	Ping        time.Duration `csv:"ping"`
	// contains filtered or unexported fields
}

func (*PingInfo) MarshalBinary added in v1.2.0

func (s *PingInfo) MarshalBinary() ([]byte, error)

func (*PingInfo) PingInfoQuery

func (s *PingInfo) PingInfoQuery(conn net.Conn, id int, options *protocol.Options) error

func (*PingInfo) String

func (s *PingInfo) String() string

func (*PingInfo) UnmarshalBinary

func (s *PingInfo) UnmarshalBinary(data []byte) error

type Query

type Query struct {
	ServerInfo *PingInfo
	GameInfo   *GameInfo
	Error      error
}

type StatusBit

type StatusBit int
const (
	Protected StatusBit = 1 << iota
	Dedicated
	AllowOldClients
	Started
	Dynamix
	WON
	Unknown2
	Unknown3
)

type StatusByte

type StatusByte byte

func (StatusByte) MarshalJSON

func (s StatusByte) MarshalJSON() ([]byte, error)

func (StatusByte) String

func (s StatusByte) String() string

func (StatusByte) StringSlice

func (s StatusByte) StringSlice() []string

func (StatusByte) Struct

func (s StatusByte) Struct() StatusByteStruct

type StatusByteStruct

type StatusByteStruct struct {
	Protected       bool
	Dedicated       bool
	AllowOldClients bool
	Started         bool
	Dynamix         bool
	WON             bool
	Unknown2        bool
	Unknown3        bool
}

func (StatusByteStruct) MarshalBinary added in v1.2.0

func (s StatusByteStruct) MarshalBinary() byte

Jump to

Keyboard shortcuts

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