From a25597ca304cc9ce978ae93ed89f45c3747a2031 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 17 Nov 2023 12:01:19 +0000 Subject: [PATCH] Server: updated documentation for prepareBatch() --- src/Server.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Server.php b/src/Server.php index f4d4a0958..63eee3b2a 100644 --- a/src/Server.php +++ b/src/Server.php @@ -1357,7 +1357,14 @@ class Server{ /** * @internal - * Broadcasts a list of packets in a batch to a list of players + * Promises to compress the given batch buffer using the selected compressor, optionally on a separate thread. + * + * If the buffer is smaller than the batch-threshold (usually 256), the buffer will be compressed at level 0 if supported + * by the compressor. This means that the payload will be wrapped with the appropriate header and footer, but not + * actually compressed. + * + * If the buffer is larger than the async-compression-threshold (usually 10,000), the buffer may be compressed in + * a separate thread (if available). * * @param bool|null $sync Compression on the main thread (true) or workers (false). Default is automatic (null). */