Documentation

Network
in package

Table of Contents

$advancedInterfaces  : array<string|int, AdvancedNetworkInterface>
$bandwidthTracker  : BidirectionalBandwidthStatsTracker
$bannedIps  : array<string|int, int>
$interfaces  : array<string|int, NetworkInterface>
$logger  : Logger
$name  : string
$rawPacketHandlers  : array<string|int, RawPacketHandler>
$sessionManager  : NetworkSessionManager
__construct()  : mixed
blockAddress()  : void
Blocks an IP address from the main interface. Setting timeout to -1 will block it forever
getBandwidthTracker()  : BidirectionalBandwidthStatsTracker
getConnectionCount()  : int
getInterfaces()  : array<string|int, NetworkInterface>
getName()  : string
getSessionManager()  : NetworkSessionManager
processRawPacket()  : void
registerInterface()  : bool
registerRawPacketHandler()  : void
Registers a raw packet handler on the network.
sendPacket()  : void
setName()  : void
Sets the server name shown on each interface Query
tick()  : void
unblockAddress()  : void
unregisterInterface()  : void
unregisterRawPacketHandler()  : void
Unregisters a previously-registered raw packet handler.
updateName()  : void

Properties

$bannedIps

private array<string|int, int> $bannedIps = []

Methods

__construct()

public __construct(Logger $logger) : mixed
Parameters
$logger : Logger
Return values
mixed

blockAddress()

Blocks an IP address from the main interface. Setting timeout to -1 will block it forever

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

getConnectionCount()

public getConnectionCount() : int
Return values
int

getName()

public getName() : string
Return values
string

registerRawPacketHandler()

Registers a raw packet handler on the network.

public registerRawPacketHandler(RawPacketHandler $handler) : void
Parameters
$handler : RawPacketHandler
Return values
void

sendPacket()

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

setName()

Sets the server name shown on each interface Query

public setName(string $name) : void
Parameters
$name : string
Return values
void

tick()

public tick() : void
Return values
void

unblockAddress()

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

unregisterRawPacketHandler()

Unregisters a previously-registered raw packet handler.

public unregisterRawPacketHandler(RawPacketHandler $handler) : void
Parameters
$handler : RawPacketHandler
Return values
void

updateName()

public updateName() : void
Return values
void

Search results