summaryrefslogtreecommitdiff
path: root/resources/external/client_ws_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/external/client_ws_test.py')
-rw-r--r--resources/external/client_ws_test.py12
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