You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ws://localhost:4000/xydata : only to get the xy coordinates data
ws://localhost:4000/commands : to send different commands and get the reply
ws://localhost:4000/messages : to receive messages
My question how do I send commands on the websocket, if I am make seperate endpoints in the RTK query using the streaming example on the website will it create new websocket connection for each endpoints.
Here is my code :
I understand that the basequery will be ignored as i have used queryFn for the query in my endpoint, but this one only gets the data.
What do i have to do if i have to send different comands to a specific websocket and then get their replies?
For example I would like to send commands like : 'get_configuration' , 'set_configuration','set_user' , to the websocket.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have backend websockets which are as follows:
My question how do I send commands on the websocket, if I am make seperate endpoints in the RTK query using the streaming example on the website will it create new websocket connection for each endpoints.
Here is my code :
I understand that the basequery will be ignored as i have used queryFn for the query in my endpoint, but this one only gets the data.
What do i have to do if i have to send different comands to a specific websocket and then get their replies?
For example I would like to send commands like : 'get_configuration' , 'set_configuration','set_user' , to the websocket.
Beta Was this translation helpful? Give feedback.
All reactions