Closed ckpiggy closed 6 years ago
When the server close websocket connection, we can send code and message. https://docs.totaljs.com/latest/en.html#api~WebSocketClient~client.close
But it seems I can't get the code and message on "close" event, as I am a client. https://docs.totaljs.com/latest/en.html#api~WebSocketClient~client.on('close')
Hi @ckpiggy, there is not a support for it, but I'm going to look into it.
Hi @ckpiggy I have fixed it. Just download latest beta version $ npm install total.js@beta
$ npm install total.js@beta
Documentation: https://docs.totaljs.com/v3.x.x/en.html#api~WebSocketClient~client.on('close')
When the server close websocket connection, we can send code and message. https://docs.totaljs.com/latest/en.html#api~WebSocketClient~client.close
But it seems I can't get the code and message on "close" event, as I am a client. https://docs.totaljs.com/latest/en.html#api~WebSocketClient~client.on('close')