Skip to content

NetherNetInterface 5.46.0 ​

final class · pocketmine\network\mcpe\nethernet\NetherNetInterface · source

Implements AdvancedNetworkInterface

Network interface for the NetherNet transport (WebRTC data channels with HTTP signaling), used by Bedrock clients 1.26.50 and newer. The transport itself is terminated by a native helper program (pm-nethernet) that relays game batches over a loopback link; this class turns them into NetworkSessions, exactly like RakLibInterface does for RakNet. RakNet keeps working side by side for older clients.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\Server $server, \pocketmine\network\mcpe\nethernet\NetherNetConfig $config, string $bridgeLogFile, \pocketmine\network\mcpe\PacketBroadcaster $packetBroadcaster, \pocketmine\network\mcpe\EntityEventBroadcaster $entityEventBroadcaster, \pocketmine\network\mcpe\convert\TypeConverter $typeConverter, ?string $token = null)

addRawPacketFilter() ​

php
public function addRawPacketFilter(string $regex) : void

blockAddress() ​

php
public function blockAddress(string $address, int $timeout = 300) : void

generateToken() ​

php
public static function generateToken() : string

Secret shared with the bridge process (link authentication) and with RakLib's relay socket.

sendRawPacket() ​

php
public function sendRawPacket(string $address, int $port, string $payload) : void

setName() ​

php
public function setName(string $name) : void

setNetwork() ​

php
public function setNetwork(\pocketmine\network\Network $network) : void

shutdown() ​

php
public function shutdown() : void

start() ​

php
public function start() : void

tick() ​

php
public function tick() : void

unblockAddress() ​

php
public function unblockAddress(string $address) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.