mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -07:00
* Bump websocket-client from 1.2.1 to 1.2.3 Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.2.1 to 1.2.3. - [Release notes](https://github.com/websocket-client/websocket-client/releases) - [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog) - [Commits](https://github.com/websocket-client/websocket-client/compare/v1.2.1...v1.2.3) --- updated-dependencies: - dependency-name: websocket-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update websocket-client==1.2.3 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
21 lines
481 B
Python
21 lines
481 B
Python
#!/usr/bin/env python
|
|
|
|
# From https://github.com/aaugustin/websockets/blob/main/example/echo.py
|
|
|
|
import asyncio
|
|
import websockets
|
|
import os
|
|
|
|
LOCAL_WS_SERVER_PORT = os.environ.get('LOCAL_WS_SERVER_PORT', '8765')
|
|
|
|
|
|
async def echo(websocket, path):
|
|
async for message in websocket:
|
|
await websocket.send(message)
|
|
|
|
|
|
async def main():
|
|
async with websockets.serve(echo, "localhost", LOCAL_WS_SERVER_PORT):
|
|
await asyncio.Future() # run forever
|
|
|
|
asyncio.run(main())
|