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
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
Methods
- __construct() : mixed
- execute() : string
- send() : string
- getLong() : int
- Return a long and split it out of the string - unsigned long (32 bit, little endian byte order)
- getString() : string
- 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
int
$errno
$errstr
public
string
$errstr
$ip
protected
mixed
$ip
$port
protected
mixed
$port
$requestId
protected
int
$requestId
$socket
protected
resource|false
$socket
Methods
__construct()
public
__construct(mixed $ip, mixed $port, mixed $password) : mixed
Parameters
- $ip : mixed
- $port : mixed
- $password : mixed
execute()
public
execute(mixed $message) : string
Parameters
- $message : mixed
Return values
stringsend()
public
send(mixed $commandId, mixed $messageBody) : string
Parameters
- $commandId : mixed
- $messageBody : mixed
Tags
Return values
stringgetLong()
Return a long and split it out of the string - unsigned long (32 bit, little endian byte order)
protected
getLong(string &$string) : int
Parameters
- $string : string
-
String
Tags
Return values
intgetString()
Return a string and split it out of the string
protected
getString(string &$string) : string
Parameters
- $string : string
-
String
Return values
stringthrowError()
protected
throwError(mixed $string, array<string|int, mixed> $data) : void
Parameters
- $string : mixed
- $data : array<string|int, mixed>