summaryrefslogtreecommitdiff
path: root/swiftstory/interface/ws.py
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2025-08-18 11:37:51 +0200
committerOlivier Gayot <olivier.gayot@sigexec.com>2025-08-18 11:56:22 +0200
commit6881f41f8e10bf6f7fd806454f8b8359b9f3d325 (patch)
tree9320edc909858f56bb2a20370cc85abdf16aa5e8 /swiftstory/interface/ws.py
parent53d81d71d071543b8dbc24d6f16cbde98f5cc3ce (diff)
swiftstory: move out of legacy websockets 14.0 implementationwebsockets-new-impl
https://websockets.readthedocs.io/en/stable/howto/upgrade.html Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'swiftstory/interface/ws.py')
-rw-r--r--swiftstory/interface/ws.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/swiftstory/interface/ws.py b/swiftstory/interface/ws.py
index 082ed1a..e9150dd 100644
--- a/swiftstory/interface/ws.py
+++ b/swiftstory/interface/ws.py
@@ -7,7 +7,7 @@ import logging
from typing import Union
import websockets.exceptions
-from websockets.server import WebSocketServerProtocol
+from websockets.asyncio.server import ServerConnection
from swiftstory.client import Client
from swiftstory.exception import WrongAction, JoinError
@@ -20,7 +20,7 @@ class WebsocketsInterface:
def __init__(self, game_manager: GameManager):
self.game_manager = game_manager
- async def connection_handler(self, websocket: WebSocketServerProtocol, path: str) -> None:
+ async def connection_handler(self, websocket: ServerConnection) -> None:
""" Coroutine that handles one websocket connection. """
client = Client(websocket, self.game_manager)