How to share websocket context in quart #297
Unanswered
arpantechparticle
asked this question in
Q&A
Replies: 1 comment
-
I'm a bit short of time, so can only point you at this article I wrote some years ago that will best explain how to do this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i have quart app with with websocket method.
Here SChargePoint which extended ChargePoint class.
ChargePoint class handle send, receive message of web socket.
when new connection is made i store it in charge_points. it store SChargePoint instance.
when need to send message to specific charger ponit id. i called
it class remote_start_transaction method of SChargePoint class. SChargePoint already has websocket connection. but when it try to send message using send then get error ⇒ Not within a websocket context.
i use this @app.post("/fleet/start-charging/string:charge_point_id")
@copy_current_websocket_context but not luck
Beta Was this translation helpful? Give feedback.
All reactions