package
0.0.0-20210915183647-588d2c83ddb7
Repository: https://github.com/syncore/a2sapi.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
DirectQuery allows a user to query any host even if it is not in the internal server ID database.
GetInfoForServer requests A2S_INFO for a given host within timeout seconds.
GetPlayersForServer requests A2S_PLAYER info for a given host within timeout seconds.
GetRulesForServer requests A2S_RULES info for a given host within timeout seconds.
NewMasterQuery initiates a new Steam Master server query for a given filter, returning a MasterQuery struct containing the hosts retrieved in the event of success or an empty struct and an error in the event of failure.
NewMasterWebQuery initiates a new Steam "Master" server query using the Steam Web API for a given filter, returning a MasterQuery struct containing the hosts retrieved in the event of success or an empty struct and an error in the event of failure.
Query retrieves the server information for a given set of host to game pairs and returns it in a format that is presented to the API.
RetryFailedInfoReq retries a failed A2S_INFO request for a specified group of failed hosts for a total of retrycount times, returning a host to A2S_INFO mapping for any hosts that were successfully retried.
RetryFailedPlayersReq retries a failed A2S_PLAYER request for a specified group of failed hosts for a total of retrycount times, returning a host to A2S_PLAYER mapping for any hosts that were successfully retried.
RetryFailedRulesReq retries a failed A2S_RULES request for a specified group of failed hosts for a total of retrycount times, returning a host to A2S_RULES mapping for any hosts that were successfully retried.
StartMasterRetrieval starts a timed retrieval of servers specified by a given filter from the Steam Master server after an initial delay of initialDelay seconds.
# Constants
QueryRetryCount is the number of times to re-request rules, players, and info on failure.
QueryTimeout is the connect, read, and write timeout in seconds.
# Variables
ErrChallengeResponse is an error thrown for an invalid challense response header.
ErrDataTransmit is an error related to sending data to a connection.
ErrHostConnection is an error related to the establishment of a connection.
ErrMultiPacketDuplicate is an error thrown when a duplicate packet is detected int he multi-packet context of A2S_RULES.
ErrMultiPacketIDMismatch is an error thrown in the context of multi-packet A2S_RULES when the current packet ID does match the packet ID for the batch of multiple packets currently being processed.
ErrMultiPacketNumExceeded is an error thrown in the A2S_RULES multi-packet context when the current packet's number is greater than the total number of packets to be parsed within the current batch.
ErrMultiPacketTransmit is an error related to sending data to a connection in the multi-packet context of A2S_RULES.
ErrNoInfo is a generic error thrown when no A2S_INFO could be parsed for the given server.
ErrNoPlayers is a generic error thrown when a server is empty.
ErrNoRules is a generic error thrown when no A2S_RULES data could be parsed for the given server.
ErrPacketHeader is an error thrown upon detection of an invalid packet header.
# Structs
MasterQuery contains the servers returned by a query to the Steam master server.