Documentation

DedicatedQueryNetworkInterface
in package
implements AdvancedNetworkInterface

This is a supplementary network interface to maintain Query functionality when the RakLibInterface is not registered.

Normally, Query runs on the same port as RakLib does, so Query handles packets coming in on RakLib's socket instead of using its own interface.

However, it's necessary to have a separate interface for the cases where the RakLib interface is either not registered or running on a different port than Query.

Interfaces, Classes, Traits and Enums

AdvancedNetworkInterface
Advanced network interfaces have some additional capabilities, such as being able to ban addresses and process raw packets.

Table of Contents

$blockedIps  : array<string|int, int>
$ip  : string
$logger  : Logger
$network  : Network
$port  : int
$rawPacketPatterns  : array<string|int, string>
$socket  : Socket
__construct()  : mixed
addRawPacketFilter()  : void
Adds a regex filter for raw packets to this network interface. This filter should be used to check validity of raw packets before relaying them to the main thread.
blockAddress()  : void
Prevents packets received from the IP address getting processed for the given timeout.
sendRawPacket()  : void
Sends a raw payload to the network interface, bypassing any sessions.
setName()  : void
setNetwork()  : void
shutdown()  : void
start()  : void
tick()  : void
unblockAddress()  : void
Unblocks a previously-blocked address.

Properties

Methods

addRawPacketFilter()

Adds a regex filter for raw packets to this network interface. This filter should be used to check validity of raw packets before relaying them to the main thread.

public addRawPacketFilter(string $regex) : void
Parameters
$regex : string
Return values
void

blockAddress()

Prevents packets received from the IP address getting processed for the given timeout.

public blockAddress(string $address[, int $timeout = 300 ]) : void
Parameters
$address : string
$timeout : int = 300

Seconds

Return values
void

sendRawPacket()

Sends a raw payload to the network interface, bypassing any sessions.

public sendRawPacket(string $address, int $port, string $payload) : void
Parameters
$address : string
$port : int
$payload : string
Return values
void

unblockAddress()

Unblocks a previously-blocked address.

public unblockAddress(string $address) : void
Parameters
$address : string
Return values
void

Search results