a2s

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUnsupportedQueryError

func NewUnsupportedQueryError(header []byte) error

NewUnsupportedQueryError returns a new instance of UnsupportedQueryError.

Types

type QueryResponder

type QueryResponder struct {
	*proto.QueryBase
	// contains filtered or unexported fields
}

QueryResponder implements proto.QueryResponder for the A2S protocol.

func NewQueryResponder

func NewQueryResponder(state *proto.QueryState) (*QueryResponder, error)

NewQueryResponder returns creates a new responder capable of responding to a2s-formatted queries.

func (*QueryResponder) Respond

func (q *QueryResponder) Respond(clientAddress string, buf []byte) ([]byte, error)

Respond writes a query response to the requester in the SQP wire protocol.

type UnsupportedQueryError

type UnsupportedQueryError struct {
	// contains filtered or unexported fields
}

UnsupportedQueryError is an error which represents an invalid SQP query header.

func (*UnsupportedQueryError) Error

func (e *UnsupportedQueryError) Error() string

Error returns the error string.

Jump to

Keyboard shortcuts

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