Documentation

RCon
in package

Legacy Source RCON client for querying and executing remote server commands.

Included for historical compatibility only. This API is out of support and should not be used in new code.

Tags
author

Daniel Schulz

since
2017-12-28

Table of Contents

Constants

ERR_RESPONSE_CODE_AUTH  : mixed = 'Server authentication failed!'
ERR_RESPONSE_CODE_UNKNOWN  : mixed = 'Server responded with unknown command code: "%...
ERR_RESPONSE_CONNECT  : mixed = 'Could not reach server %1$s:%2$s!'
ERR_RESPONSE_EMPTY  : mixed = 'Empty response?!'
NULL_BYTE  : mixed = "\x00"
PACKET_SIZE  : mixed = 1400
REPLY_GETCHALLENGE  : mixed = "A"
REPLY_INFO  : mixed = "I"
SERVERDATA_AUTH  : mixed = 3
SERVERDATA_AUTH_RESPONSE  : mixed = 2
SERVERDATA_EXECCOMMAND  : mixed = 2
SERVERDATA_RESPONSE_VALUE  : mixed = 0
SERVERQUERY_GETCHALLENGE  : mixed = "\xff\xff\xff\xffW"
SERVERQUERY_INFO  : mixed = "\xff\xff\xff\xffTSource Engine Query"

Properties

$errno  : mixed
$errstr  : mixed
$ip  : mixed
$port  : mixed
$requestId  : mixed
$socket  : mixed

Methods

__construct()  : mixed
execute()  : mixed
send()  : mixed
getLong()  : mixed
Return a long and split it out of the string - unsigned long (32 bit, little endian byte order)
getString()  : mixed
Return a string and split it out of the string
throwError()  : void

Constants

ERR_RESPONSE_CODE_AUTH

public mixed ERR_RESPONSE_CODE_AUTH = 'Server authentication failed!'

ERR_RESPONSE_CODE_UNKNOWN

public mixed ERR_RESPONSE_CODE_UNKNOWN = 'Server responded with unknown command code: "%2$s"'

ERR_RESPONSE_CONNECT

public mixed ERR_RESPONSE_CONNECT = 'Could not reach server %1$s:%2$s!'

ERR_RESPONSE_EMPTY

public mixed ERR_RESPONSE_EMPTY = 'Empty response?!'

NULL_BYTE

public mixed NULL_BYTE = "\x00"

PACKET_SIZE

public mixed PACKET_SIZE = 1400

REPLY_GETCHALLENGE

public mixed REPLY_GETCHALLENGE = "A"

REPLY_INFO

public mixed REPLY_INFO = "I"

SERVERDATA_AUTH

public mixed SERVERDATA_AUTH = 3

SERVERDATA_AUTH_RESPONSE

public mixed SERVERDATA_AUTH_RESPONSE = 2

SERVERDATA_EXECCOMMAND

public mixed SERVERDATA_EXECCOMMAND = 2

SERVERDATA_RESPONSE_VALUE

public mixed SERVERDATA_RESPONSE_VALUE = 0

SERVERQUERY_GETCHALLENGE

public mixed SERVERQUERY_GETCHALLENGE = "\xff\xff\xff\xffW"

SERVERQUERY_INFO

public mixed SERVERQUERY_INFO = "\xff\xff\xff\xffTSource Engine Query"

Properties

$errno

public mixed $errno

$errstr

public mixed $errstr

$port

protected mixed $port

$requestId

protected mixed $requestId

$socket

protected mixed $socket

Methods

__construct()

public __construct(mixed $ip, mixed $port, mixed $password) : mixed
Parameters
$ip : mixed
$port : mixed
$password : mixed

execute()

public execute(mixed $message) : mixed
Parameters
$message : mixed

send()

public send(mixed $commandId, mixed $messageBody) : mixed
Parameters
$commandId : mixed
$messageBody : mixed

getLong()

Return a long and split it out of the string - unsigned long (32 bit, little endian byte order)

protected getLong(string &$string) : mixed
Parameters
$string : string

String

getString()

Return a string and split it out of the string

protected getString(string &$string) : mixed
Parameters
$string : string

String

throwError()

protected throwError(mixed $string, array<string|int, mixed> $data) : void
Parameters
$string : mixed
$data : array<string|int, mixed>
Tags
throws
Exception
On this page

Search results