Documentation
¶
Overview ¶
Package source provides a client which can talk to game servers which support the source RCON protocol: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol
Index ¶
Constants ¶
View Source
const (
// DefaultPort is the default source RCON port.
DefaultPort = 27015
)
Variables ¶
View Source
var ( // ErrNilOption is returned by NewClient if an option is nil. ErrNilOption = errors.New("source: nil option") // ErrNonASCII is returned if a command with non-ASCII characters is attempted. ErrNonASCII = errors.New("source: non-ascii body") // ErrAuthFailure is returned if the client failed to authenticate. ErrAuthFailure = errors.New("source: authentication failure") )
View Source
var ( // DefaultTimeout is the default read / write / dial timeout for Clients. DefaultTimeout = time.Second * 10 )
Functions ¶
func DisableMultiPacket ¶
DisableMultiPacket disables multi-packet support, which not all servers support. This is required for Minecraft and Starbound servers.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a source rcon client.
func NewClient ¶
NewClient returns a new source rcon client connected to addr. If addr doesn't include a port the DefaultPort will be used.
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
Cmd represents a source rcon command.
type ErrMalformedResponse ¶
type ErrMalformedResponse string
ErrMalformedResponse is returned if the response from the server is malformed.
func (ErrMalformedResponse) Error ¶
func (e ErrMalformedResponse) Error() string
Click to show internal directories.
Click to hide internal directories.