Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppTheShip AppId = 2400 GoldSource SourceEngine = iota + 1 Source )
View Source
const ( GoldSourceInfoResponseType = 0x6D SourceInfoResponseType = 0x49 )
Official versions of the A2S_INFO reply.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extended ¶
type Extended struct { AppId AppId GameVersion string Port uint16 // 0 if not present. SteamId uint64 // 0 if not present. GameModeDescription string // "" if not present. GameId uint64 // 0 if not present. }
Extended Optional information available with S2A_INFO_SOURCE. This is a grab-bag of various optional bits. If some are not present they are left as 0. In the future this may change to distinguish from being present as 0.
type ModInfo ¶
type ModInfo struct { Url string `json:"url"` DownloadUrl string `json:"download_url"` Version uint32 `json:"version"` Size uint32 `json:"size"` Type uint8 `json:"type"` Dll uint8 `json:"dll"` }
ModInfo Optional mod information returned by S2A_INFO_GOLDSRC.
type Player ¶
type Player struct { Index int `json:"index"` Score int `json:"score"` Name string `json:"name"` SteamID string `json:"steam_id"` Duration int `json:"duration"` }
Player Source server players
type PlayerList ¶
type Server ¶
type Server struct { Address string `json:"address"` Version SourceEngine `json:"version"` Protocol uint8 `json:"protocol"` Name string `json:"name"` Map string `json:"map"` Folder string `json:"folder"` Game string `json:"game"` Players uint8 `json:"players"` MaxPlayers uint8 `json:"max_players"` Bots uint8 `json:"bots"` Type ServerType `json:"type"` OS ServerOs `json:"os"` Visibility uint8 `json:"visibility"` Vac uint8 `json:"vac"` Mod *ModInfo `json:"mod"` TheShip *TheShip `json:"ship"` SourceTV *SourceTV `json:"source_tv"` Extended *Extended `json:"extended"` }
Server Information returned by an A2S_INFO query. Most of this is returned as-is from the wire, except where otherwise noted.
func (*Server) Engine ¶
func (s *Server) Engine() SourceEngine
Engine Attempt to guess the game engine version.
type ServerType ¶
type ServerType uint8
const ( ServerTypeUnknown ServerType = iota ServerTypeDedicated // 1 ServerTypeNonDedicated // 2 ServerTypeSourceTV // 3 )
func (ServerType) String ¶
func (t ServerType) String() string
type SourceEngine ¶
type SourceEngine uint8
Click to show internal directories.
Click to hide internal directories.