net: compressors are now fully dynamic (or at least the potential to be)

the compressor used by RakLibInterface when opening a session is still
hardcoded, but that's because we have no way to select the correct
compressor at that point in the login sequence, since we aren't
propagating the protocol information up from RakLib right now.
This commit is contained in:
Dylan K. Taylor
2020-04-28 16:21:18 +01:00
parent d9e4783b24
commit 3be9548b1e
10 changed files with 122 additions and 46 deletions

View File

@ -29,7 +29,7 @@ use function zlib_decode;
use function zlib_encode;
use const ZLIB_ENCODING_DEFLATE;
final class ZlibCompressor{
final class ZlibCompressor implements Compressor{
use SingletonTrait;
public const DEFAULT_LEVEL = 7;