Documentation ¶
Overview ¶
Package steam allows querying of Source servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRCONAuthFailed = errors.New("steam: authentication failed") ErrRCONNotInitialized = errors.New("steam: rcon is not initialized") ErrInvalidResponseType = errors.New("steam: invalid response type from server") ErrInvalidResponseID = errors.New("steam: invalid response id from server") ErrInvalidResponseTrailer = errors.New("steam: invalid response trailer from server") )
Functions ¶
This section is empty.
Types ¶
type ConnectOptions ¶
type ConnectOptions struct { // Default will use net.Dialer.Dial. You can override the same by // providing your own. Dial DialFn // RCON password. RCONPassword string }
ConnectOptions describes the various connections options.
type Environment ¶
type Environment int
const ( EInvalid Environment = iota ELinux EWindows EMac )
func (Environment) String ¶
func (e Environment) String() string
type InfoResponse ¶
type InfoResponse struct { Protocol int Name string Map string Folder string Game string ID int Players int MaxPlayers int Bots int ServerType ServerType Environment Environment Visibility Visibility VAC VAC Version string Port int SteamID int64 SourceTVPort int SourceTVName string Keywords string GameID int64 }
func (*InfoResponse) String ¶
func (r *InfoResponse) String() string
type PlayersInfoResponse ¶
type PlayersInfoResponse struct {
Players []*Player
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a Source engine game server.
func Connect ¶
func Connect(addr string, os ...*ConnectOptions) (_ *Server, err error)
Connect to the source server.
func (*Server) Close ¶
func (s *Server) Close()
Close releases the resources associated with this server.
func (*Server) Info ¶
func (s *Server) Info() (*InfoResponse, error)
Info retrieves server information.
func (*Server) PlayersInfo ¶
func (s *Server) PlayersInfo() (*PlayersInfoResponse, error)
PlayersInfo retrieves player information from the server.
type ServerType ¶
type ServerType int
const ( STInvalid ServerType = iota STDedicated STNonDedicated STProxy )
func (ServerType) String ¶
func (st ServerType) String() string
type Visibility ¶
type Visibility int
const ( VInvalid Visibility = iota VPublic VPrivate )
func (Visibility) String ¶
func (v Visibility) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.