abstract |
---|
Handles the core functionality for the protocols
Methods | ||
---|---|---|
public
|
__construct(array $options = [])
|
# |
public
|
__toString(): string
|
# |
public
|
portDiff(): int
|
# |
public
|
findQueryPort(int $clientPort): int
|
# |
public
|
joinLink(): null|string
|
# |
public
|
name(): string
|
# |
public
|
nameLong(): string
|
# |
public
|
state(): int
|
# |
public
|
getProtocol(): string
|
# |
public
|
transport(string|null $type = null): string
|
# |
public
|
options(array $options = []): array
|
# |
public
|
getPacket(array $type = []): array
|
# |
public
|
packetResponse(array $response = []): array
|
# |
public
|
hasChallenge(): bool
|
# |
public
|
challengeParseAndApply(Buffer $challenge_buffer): bool
|
# |
protected
|
challengeApply(string $challenge_string): bool
|
# |
public
|
getNormalize(): array
|
# |
public
|
beforeSend(Server $server)
|
# |
abstract
public
|
processResponse(): mixed
|
# |
Constants | |||
---|---|---|---|
public
|
STATE_TESTING = 1
|
# | |
public
|
STATE_BETA = 2
|
# | |
public
|
STATE_STABLE = 3
|
# | |
public
|
STATE_DEPRECATED = 4
|
# | |
public
|
PACKET_ALL = 'all'
|
# | |
public
|
PACKET_BASIC = 'basic'
|
# | |
public
|
PACKET_CHALLENGE = 'challenge'
|
# | |
public
|
PACKET_CHANNELS = 'channels'
|
# | |
public
|
PACKET_DETAILS = 'details'
|
# | |
public
|
PACKET_INFO = 'info'
|
# | |
public
|
PACKET_PLAYERS = 'players'
|
# | |
public
|
PACKET_STATUS = 'status'
|
# | |
public
|
PACKET_RULES = 'rules'
|
# | |
public
|
PACKET_VERSION = 'version'
|
# | |
public
|
TRANSPORT_UDP = 'udp'
|
# | |
public
|
TRANSPORT_TCP = 'tcp'
|
# | |
public
|
TRANSPORT_SSL = 'ssl'
|
# | |
public
|
TRANSPORT_TLS = 'tls'
|
# |
Properties | |||
---|---|---|---|
protected
|
string
|
$name = 'unknown'
|
# |
protected
|
string
|
$name_long = 'unknown'
|
# |
protected
|
int
|
$port_diff = 0
|
# |
protected
|
string
|
$transport = self::TRANSPORT_UDP
|
# |
protected
|
string
|
$protocol = 'unknown'
|
# |
protected
|
array
|
$packets = []
|
# |
protected
|
array
|
$responses = []
|
# |
protected
|
array
|
$process_methods = []
|
# |
protected
|
array
|
$packets_response = []
|
# |
protected
|
null
|
$result = null
|
# |
protected
|
array
|
$options = []
|
# |
protected
|
int
|
$state = self::STATE_STABLE
|
# |
protected
|
array
|
$normalize = [
'general' => [
'dedicated' => [
'listenserver',
'dedic',
'bf2dedicated',
'netserverdedicated',
'bf2142dedicated',
'dedicated',
],
'gametype' => ['ggametype', 'sigametype', 'matchtype'],
'hostname' => ['svhostname', 'servername', 'siname', 'name'],
'mapname' => ['map', 'simap'],
'maxplayers' => ['svmaxclients', 'simaxplayers', 'maxclients', 'max_players'],
'mod' => ['game', 'gamedir', 'gamevariant'],
'numplayers' => ['clients', 'sinumplayers', 'num_players'],
'password' => ['protected', 'siusepass', 'sineedpass', 'pswrd', 'gneedpass', 'auth', 'passsord'],
],
'player' => [
'name' => ['nick', 'player', 'playername', 'name'],
'kills' => ['kills'],
'deaths' => ['deaths'],
'score' => ['kills', 'frags', 'skill', 'score'],
'ping' => ['ping'],
],
'team' => ['name' => ['name', 'teamname', 'team_t'], 'score' => ['score', 'score_t']],
]
|
# |
protected
|
null|string
|
$join_link = null
|
# |