websocket connection will auto close after a few minutes if server doesnot push data to client. I watch the close event, and reconnect websocket.
But reconnecting websocket will spend a few seconds. At the reconnecting time, if server send data, client will lose these data.
How should I do if I want to catch data when reconnecting websocket ?