Skip to content

Close client Connection with custom message #899

Answered by ironydips
ironydips asked this question in Q&A
Discussion options

You must be logged in to vote

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 in open method at backend, ws.on('error') gets called at frontend with this error message:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ironydips
Comment options

Answer selected by uNetworkingAB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
invalid This doesn't seem right
2 participants