summaryrefslogtreecommitdiff
path: root/swiftstory/client.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/client.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/client.py')
-rw-r--r--swiftstory/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/swiftstory/client.py b/swiftstory/client.py
index cd5e82a..0831cb0 100644
--- a/swiftstory/client.py
+++ b/swiftstory/client.py
@@ -5,7 +5,7 @@ import logging
from typing import Optional
import websockets.exceptions
-from websockets.server import WebSocketServerProtocol
+from websockets.asyncio.server import ServerConnection
from swiftstory.game import Game
from swiftstory.game_manager import GameManager
@@ -17,7 +17,7 @@ class Client:
""" Represent a client.
A client manages a (web)socket to communicate with the outside world.
It also manages the associated player when in a game. """
- def __init__(self, socket: WebSocketServerProtocol, game_manager: GameManager) -> None:
+ def __init__(self, socket: ServerConnection, game_manager: GameManager) -> None:
self.game: Optional[Game] = None
self.game_manager: GameManager = game_manager