WebSocket On Event callback #676
Unanswered
jeffery30162
asked this question in
Q&A
Replies: 2 comments 5 replies
-
app.ws('/',{
message: async (ws, message) => {
const response = await doAsync(message)
ws.send(response)
}
}) |
Beta Was this translation helpful? Give feedback.
4 replies
-
By the way. If you are looking for a more |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does this support callback functionality using websockets similar to express?
Express Example:
socket.on('data', (data, out_data) => { if(data && data.event) handleData(socket, data, out_data); });
If not, what is the best way to achieve this kind of client await response code flow?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions