async def __call__(self, scope, receive, send): websocket = WebSocket(scope=scope, receive=receive, send=send) await websocket.accept() await websocket.send_json( {"URL": str(websocket.url_for("websocket_endpoint"))}) await websocket.close()
async def __call__(self, receive, send): session = WebSocket(scope=self.scope, receive=receive, send=send) await session.accept() await session.send_json( {"URL": str(session.url_for("WebsocketEndpoint"))}) await session.close()