Skip to content

TransportAwarePacketSender 5.46.0 ​

interface · pocketmine\network\mcpe\TransportAwarePacketSender · source

Extends PacketSender

A PacketSender that can describe the transport carrying the session (RakNet, NetherNet...). Senders that do not implement this are treated as unencrypted RakNet-like transports.

Methods ​

getPeerPublicKey() ​

php
public function getPeerPublicKey() : ?string

Base64-encoded DER public key that the peer proved possession of at the transport level (NetherNet identity assertion), or null if the transport does not authenticate the peer.

getTransportName() ​

php
public function getTransportName() : string

Short lowercase name of the transport, e.g. "raknet" or "nethernet".

isTransportEncrypted() ​

php
public function isTransportEncrypted() : bool

Whether the transport itself encrypts and authenticates the traffic (NetherNet uses DTLS). Vanilla clients do not perform the Minecraft-level encryption handshake on such transports, so the server must skip it.

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