0.13.0
This is a major update. It features substantial API changes and is not API-compatible with anything that used version 0.12.
Changes since 0.12.x
Major changes
- Support for PHP versions lower than 7.4 has been dropped.
- RakLib no longer depends on pthreads. It's now the user's job to implement whatever systems necessary to use RakLib on a thread, if necessary.
- A separate library, pocketmine/raklib-ipc is provided, which allows interacting with RakLib using a CSP pattern.
- Packet filtering at the socket receive level is now supported using PCRE regex patterns.
- The server implementation now uses cooperative multitasking to process events. This ensures that a flood of network traffic can't prevent events from being processed on the server.
API change highlights
This version features a substantially improved API compared to 0.12.
-
InternetAddress
is no longer mutable. -
UDPServerSocket
was moved toraklib\generic\Socket
. -
A new
ServerInterface
has been introduced. -
A new
ServerEventListener
interface has been introduced. This allows directly listening to events on the RakLib server, such as a user packet being received, session ping being updated, etc. -
Various parts of
Session
have been isolated into generic components (non-server-specific):- A
ReceiveReliabilityLayer
was extracted, which encapsulates all of the logic needed to take care of inbound packet reliability handling and split packet handling, and ACK/NACK sending. - A
SendReliabilityLayer
was extracted, which encapsulates all of the logic needed to take care of sending outbound packets, splitting them if necessary, and resending them if they get NACKed by the remote peer.
- A
-
Added a
ProtocolAcceptor
interface, which may be used to alter which versions of RakNet a remote peer may use to connect to the server.