initial commit

This commit is contained in:
2025-08-05 15:53:44 +08:00
commit 09dc02ae52
553 changed files with 137665 additions and 0 deletions

18
third_party/libhv/scripts/websocket_server.py vendored Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
# pip3 install websockets
import asyncio
import websockets
async def echo(websocket):
async for message in websocket:
print(message)
await websocket.send(message)
async def serve(port):
async with websockets.serve(echo, "0.0.0.0", port):
await asyncio.Future()
if __name__ == "__main__":
asyncio.run(serve(9999))