-
hi, we have to close client connection from backend with specific code & message. Close Reasons can be varied
We are using |
Beta Was this translation helpful? Give feedback.
Answered by
ironydips
May 6, 2023
Replies: 1 comment 1 reply
-
You have to check with your client how to do it, we support sending error codes with websocket.end(integer, string) |
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
UPDATE: Ignore this. Just realised, we have to send custom Error Codes b/w 4000 to 4999. It's working fine now.
sorry for confusion, by client side I meant my front end code. We are writing both backend and front end. Frontend use plain websocket connection
new WebSocket(url)
whenever we send
ws.end(101, 'already too many connections')
message inopen
method at backend,ws.on('error')
gets called at frontend with this error message: