mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
Changes since 4.5.1: - v4.6+: Add support for WebTransport protocol - v4.9+: Improved async task handling and cancellation - v4.11.0: Required minimum for python-socketio 5.12+ - Various fixes for connection lifecycle and error handling Also add test.sh to verify WSGI/ASGI app wrappers and server creation. Link: https://github.com/miguelgrinberg/python-engineio/blob/main/CHANGES.md Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
31 lines
586 B
Bash
Executable File
31 lines
586 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ "$1" = "python3-engineio" ] || exit 0
|
|
|
|
python3 - << EOF
|
|
import sys
|
|
|
|
# Verify key classes are importable
|
|
from engineio import Server, AsyncServer, WSGIApp, ASGIApp
|
|
|
|
# AsyncServer with asgi mode needs no external dependencies
|
|
asrv = AsyncServer(async_mode='asgi')
|
|
assert asrv is not None
|
|
|
|
received = []
|
|
|
|
@asrv.on("connect")
|
|
async def on_connect(sid, environ):
|
|
received.append(("connect", sid))
|
|
|
|
@asrv.on("disconnect")
|
|
async def on_disconnect(sid):
|
|
received.append(("disconnect", sid))
|
|
|
|
# ASGI app wrapper
|
|
aapp = ASGIApp(asrv)
|
|
assert aapp is not None
|
|
|
|
sys.exit(0)
|
|
EOF
|