NetherNetInterface 5.46.0
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) : voidblockAddress()
php
public function blockAddress(string $address, int $timeout = 300) : voidgenerateToken()
php
public static function generateToken() : stringSecret shared with the bridge process (link authentication) and with RakLib's relay socket.
sendRawPacket()
php
public function sendRawPacket(string $address, int $port, string $payload) : voidsetName()
php
public function setName(string $name) : voidsetNetwork()
php
public function setNetwork(\pocketmine\network\Network $network) : voidshutdown()
php
public function shutdown() : voidstart()
php
public function start() : voidtick()
php
public function tick() : voidunblockAddress()
php
public function unblockAddress(string $address) : void