This repository has been archived on 2025-07-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tetri5-backend/__init__.py

13 lines
347 B
Python

#!/usr/bin/env python
import asyncio
import websockets
async def echo(websocket, path):
async for message in websocket:
await websocket.send(message)
asyncio.get_event_loop().run_until_complete(
websockets.serve(echo, 'tetris-clone.azurewebsites.net', 5000))
print("starting websocket...")
asyncio.get_event_loop().run_forever()