diff --git a/examples/basic_ws.py b/examples/basic_ws.py index 4efdc9df..bc4c49ec 100644 --- a/examples/basic_ws.py +++ b/examples/basic_ws.py @@ -24,4 +24,8 @@ async def ws(msg:str, send): await sleep(2) return Div('Goodbye ' + msg, id=nid), mk_inp() +@app.ws('/stream', conn=on_connect, disconn=on_disconnect) +async def ws_stream(ws, data): + print(data) + serve()