MultiServer: implement NoText and deprecate uncompressed Websocket connections (#4540)

* MultiServer: add NoText tag and handling

* MultiServer: deprecate and warn for uncompressed connections

* MultiServer: fix missing space in no compression warning
This commit is contained in:
black-sliver
2025-01-29 01:42:46 +01:00
committed by GitHub
parent 1ebc9e2ec0
commit 41898ed640
3 changed files with 44 additions and 16 deletions

View File

@@ -5,7 +5,8 @@ import enum
import warnings
from json import JSONEncoder, JSONDecoder
import websockets
if typing.TYPE_CHECKING:
from websockets import WebSocketServerProtocol as ServerConnection
from Utils import ByValue, Version
@@ -151,7 +152,7 @@ decode = JSONDecoder(object_hook=_object_hook).decode
class Endpoint:
socket: websockets.WebSocketServerProtocol
socket: "ServerConnection"
def __init__(self, socket):
self.socket = socket