diff options
| author | Anson Bridges <bridges.anson@gmail.com> | 2025-08-15 23:04:40 -0700 |
|---|---|---|
| committer | Anson Bridges <bridges.anson@gmail.com> | 2025-08-15 23:04:40 -0700 |
| commit | f087c6a98b1da55525a6e3c1d7c82477f82eb5cd (patch) | |
| tree | 0e2b517bedb3dd475c2b82a1b05800e5b7593854 /resources/external/client_ws_test.py | |
| parent | d558a9add0e183219a7a9ff482807bdcd677e21a (diff) | |
Game Coordinator now mostly (~90%) functional
Diffstat (limited to 'resources/external/client_ws_test.py')
| -rw-r--r-- | resources/external/client_ws_test.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/resources/external/client_ws_test.py b/resources/external/client_ws_test.py index 9bf5a52..5c65070 100644 --- a/resources/external/client_ws_test.py +++ b/resources/external/client_ws_test.py @@ -7,11 +7,13 @@ from websockets.asyncio.client import connect async def hello(): - async with connect("wss://echo.websocket.org", subprotocols=["lws-mirror-protocol"]) as websocket: - await websocket.send("Hello world!") - message = await websocket.recv() - print(message) - + async with connect("ws://127.0.0.1:8181") as websocket: + while True: + await websocket.send("Hello world!") + message = await websocket.recv() + print(message) + await asyncio.sleep(1) + if __name__ == "__main__": asyncio.run(hello())
\ No newline at end of file |
